eht@f.word.cs.cmu.edu (Eric Thayer) (08/18/89)
this works to open a WriteNow file in an obvious place. If Workspace knows
of a tool which will deal with the given file's extension. It will do the
right thing for that file too (i.e. start the app if not started and send
the app a openFile:ok: message). Enjoy
-------------------------------- cut here --------------------------------
#include <appkit/appkit.h>
main()
{
id SpeakerId;
port_t port;
int ec;
int returnOk;
SpeakerId = [Speaker new];
port = NXPortFromName(getenv("Workspace"),NULL); // get port for "someapp"
if (port != PORT_NULL) {
[SpeakerId setSendPort:port];
ec = [SpeakerId openFile:"/me/foo.wn" ok:&returnOk]; // any method
}
[SpeakerId free]; // when we quit
}
--
Eric H. Thayer School of Computer Science, Carnegie Mellon
(412) 268-7679 5000 Forbes Ave, Pittsburgh, PA 15213