• 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: Connecting standard output to an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 02:34:54 -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--


References: 
 >Connecting standard output to an NSTextView (From: Zac Belado <email@hidden>)

  • Prev by Date: Dumb mistake, I'm sure...
  • Next by Date: my first scriptable app
  • Previous by thread: Re: Connecting standard output to an NSTextView
  • Next by thread: Re: Connecting standard output to an NSTextView
  • Index(es):
    • Date
    • Thread