• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reading data from an NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Reading data from an NSTask (From: Ken Tozier <email@hidden>)
 >Re: Reading data from an NSTask (From: j o a r <email@hidden>)
 >Re: Reading data from an NSTask (From: Ken Tozier <email@hidden>)
 >Re: Reading data from an NSTask (From: j o a r <email@hidden>)
 >Re: Reading data from an NSTask (From: j o a r <email@hidden>)
 >Re: Reading data from an NSTask (From: Ken Tozier <email@hidden>)

  • Prev by Date: Application launch from plugin
  • Next by Date: Re: Text Processing in NSTextView
  • Previous by thread: Re: Reading data from an NSTask
  • Next by thread: Re: Reading data from an NSTask
  • Index(es):
    • Date
    • Thread