Re: NSTask taking control of my program
Re: NSTask taking control of my program
- Subject: Re: NSTask taking control of my program
- From: "M. Uli Kusterer" <email@hidden>
- Date: Fri, 26 Sep 2003 15:59:22 +0200
At 1:45 Uhr -0500 26.09.2003, Chad Armstrong wrote:
In my program, when I run the task, I want to have a Cancel/Stop
option to terminate the task if I wish, however, when the program
was running, I couldn't click on any buttons to kill the task. It
seems that the task has taken control over the parent application,
stopping any further interaction until the task is complete.
Depending on how you're reading data from the task or writing data to
it through your NSPipes and things like that, your application may be
blocking while it waits for new data.
You need to use e.g. NSFileHandle's asynchronous read/write methods
if you don't want to block. If you want an example of how to do this,
there is the TADS Wokbench for Macintosh on my web site at
http://www.zathras.de/programming/. It should contain the source code.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.