FROM : Kevin Patfield
DATE : Thu Dec 16 17:59:49 2004
NSTask and NSPipe are exactly what you need. Each instance of NSTask
can only be run once but you just make a new one for each user input.
When the task is complete you read the data out of the pipe and release
both objects. When the user makes a new request, repeat the process.
Erik Andr? Mendoza wrote:
> I'm working on a GUI wrapper for a program called Latin WORDS, which
> was originally developed in Ada for DOS, but which has since been
> ported to OS X. I've managed to create a working program using NSTask.
> However, the program is designed to remain running and receive an
> indefinite amount of input. As I understand, NSTask can only be run
> once, which makes it not ideally suited to my needs, as I wind up
> having to launch the program and quit it every time the user inputs a
> new argument, which is quite inefficient. Does anybody know of a
> better way to accomplish my goal? I've done a lot of searching, and I
> think the system() C function looks promising, but it may also suffer
> from the same issues as NSTask. Thanks in advance.
Kevin Patfield, Phoenix, Arizona
DATE : Thu Dec 16 17:59:49 2004
NSTask and NSPipe are exactly what you need. Each instance of NSTask
can only be run once but you just make a new one for each user input.
When the task is complete you read the data out of the pipe and release
both objects. When the user makes a new request, repeat the process.
Erik Andr? Mendoza wrote:
> I'm working on a GUI wrapper for a program called Latin WORDS, which
> was originally developed in Ada for DOS, but which has since been
> ported to OS X. I've managed to create a working program using NSTask.
> However, the program is designed to remain running and receive an
> indefinite amount of input. As I understand, NSTask can only be run
> once, which makes it not ideally suited to my needs, as I wind up
> having to launch the program and quit it every time the user inputs a
> new argument, which is quite inefficient. Does anybody know of a
> better way to accomplish my goal? I've done a lot of searching, and I
> think the system() C function looks promising, but it may also suffer
> from the same issues as NSTask. Thanks in advance.
Kevin Patfield, Phoenix, Arizona
| Related mails | Author | Date |
|---|---|---|
| Erik André Mendoza | Dec 16, 09:57 | |
| R.Claeson | Dec 16, 10:02 | |
| Jérôme Laurens | Dec 16, 10:50 | |
| Kevin Patfield | Dec 16, 17:59 | |
| Steven Palm | Dec 16, 22:47 |






Cocoa mail archive

