• 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 [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Reading data from an NSTask [SOLVED]
      • From: Ken Tozier <email@hidden>
References: 
 >Re: Reading data from an NSTask (From: Mark Ackerman <email@hidden>)
 >Re: Reading data from an NSTask [SOLVED] (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: Customize NSAlert?
  • Next by Date: Re: Changing startup desk
  • Previous by thread: Re: Reading data from an NSTask [SOLVED]
  • Next by thread: Re: Reading data from an NSTask [SOLVED]
  • Index(es):
    • Date
    • Thread