Re: Reading data from an NSTask
Re: Reading data from an NSTask
- Subject: Re: Reading data from an NSTask
- From: Charilaos Skiadas <email@hidden>
- Date: Mon, 4 Jul 2005 17:01:45 -0500
On Jul 4, 2005, at 4:41 PM, Ken Tozier wrote:
NSData *taskData = [[testTask
standardOutput] readDataToEndOfFile];
Unless I'm mistaken, this should be
[[[testTask standardOutput] fileHandleForReading] readDataToEndOfFile]
since you gave it an NSPipe instance, so, it will return you an
NSPipe instance, and you actually need its file handle. Don't know if
that is your problem, but it's worth a try.
Or if you prefer to not do this change, then you will need to change
your setStandardOutput command to something like:
[testTask setStandardOutput: [[NSPipe pipe] fileHandleForReading];
Btw, have you tried with a simpler command than nibtool, say ls?
something with not much output.
HTH,
Haris
_______________________________________________
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