Re: Connecting standard output to an NSTextView
Re: Connecting standard output to an NSTextView
- Subject: Re: Connecting standard output to an NSTextView
- From: Sherm Pendley <email@hidden>
- Date: Sat, 2 Feb 2002 01:03:52 -0500
On Friday, February 1, 2002, at 11:21 PM, 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.
The NSFileHandle that you pass to setStandardOutput: doesn't have to
represent a file; it can also represent a pipe. There's an example of
this in the Cocoa Developer docs. It's under "File, Resource and Process
Management > interacting with the Operating System."
If you have the developer docs installed in the default location, this
URL should do it:
<URL:
file://localhost/Developer/Documentation/Cocoa/TasksAndConcepts/ProgrammingTopics/
OperatingSystem/index.html#//apple_ref/10000058i>
sherm--