Re: Reading data from an NSTask [SOLVED]
Re: Reading data from an NSTask [SOLVED]
- Subject: Re: Reading data from an NSTask [SOLVED]
- From: j o a r <email@hidden>
- Date: Tue, 5 Jul 2005 08:09:09 +0200
On 5 jul 2005, at 01.11, Ken Tozier wrote:
[testTask setStandardOutput: pipe];
[testTask setStandardError: pipe];
Is this really such a good idea? Why mix error and output together
(if it even works)?
while ((data = [fileHandle availableData]) && [data length])
Note that "availableData" will block the execution of your thread
until it returns. Most of the time that's not what you want - at
least not in GUI applications. Another example of an asynchronous
approach:
<http://www.cocoabuilder.com/archive/message/2004/12/7/123271>
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden