Re: Redirect stderr to NSTextView
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.