Re: Connecting standard output to an NSTextView
Re: Connecting standard output to an NSTextView
- Subject: Re: Connecting standard output to an NSTextView
- From: Finlay Dobbie <email@hidden>
- Date: Sat, 2 Feb 2002 10:07:01 +0000
On Saturday, February 2, 2002, at 04:21 AM, Zac Belado wrote:
I've initiated an NSTask and I want to display the results (as they
occur)
to the user in a textview. I know the NSTask has a setStandardOutput
method
but this does, correct me if I am wrong, require the results to first be
written out to an external file.
You can use setStandardOutput:aNSFileHandle, and then use [aNSFileHandle
readInBackgroundAndNotify] for asynchronous reading.
-- Finlay