Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!f.word.cs.cmu.edu!eht From: eht@f.word.cs.cmu.edu (Eric Thayer) Newsgroups: comp.sys.next Subject: Speaking to Workspace Message-ID: <5891@pt.cs.cmu.edu> Date: 17 Aug 89 19:26:29 GMT Reply-To: eht@f.word.cs.cmu.edu (Eric Thayer) Organization: Carnegie-Mellon University, CS/RI Lines: 27 Keywords: 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 -------------------------------- #includemain() { 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