• 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: Redirect stderr to NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redirect stderr to NSTextView


  • Subject: Re: Redirect stderr to NSTextView
  • From: Koen van der Drift <email@hidden>
  • Date: Sun, 20 Jun 2004 08:11:46 -0400

On Jun 20, 2004, at 7:05 AM, Gerriet M. Denkmann wrote:

I have an app, which uses a function, which has rather many calls to fprintf(stderr,...).

I would like to have this output not go to console.log but directly into a NSTextView of my app.

Is there a simple way to do this?
(It must be possible, because Xcode does it.)

Or should one redirect (from inside my app) stderr to some /tmp/mess (probably using freopen() ) ?
Then I could, after the function has returned, put this file into my NSTextView.


Gerriet,


You should use NSTask and NSPipe. Check out the Moriarity project in the developer examples. Or the AMShellWrapper project from Andreas Mayer. Also see some threads with my name from last week, I was trying to do the same and asked some questions here.

- Koen.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Redirect stderr to NSTextView (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: How do I store a float as a value in NSDictionary?
  • Next by Date: Re: How do I store a float as a value in NSDictionary?
  • Previous by thread: Redirect stderr to NSTextView
  • Next by thread: Re: Redirect stderr to NSTextView
  • Index(es):
    • Date
    • Thread