Re: printing the standard output in a NSTextview
Re: printing the standard output in a NSTextview
- Subject: Re: printing the standard output in a NSTextview
- From: Nick Zitzmann <email@hidden>
- Date: Sun, 4 Jan 2004 20:20:54 -0800
On Jan 4, 2004, at 7:22 PM, Martin Marier wrote:
I'm trying to display the stdout of a shell command (whatever command,
I'm testing with ls) in a NSTextview. I can do the system call with
NSTask and pipe it into a NSData. How can I get the data held in
NSData to be displayed in my NSTextView ? Should I do a type cast ?
Or should I use a different type of NSView ?
NSString can convert NSData text data into a string. Try using it with
some encoding (probably ASCII) and inserting the string into the text
view. See the NSString documentation for details.
Nick Zitzmann
<
http://seiryu.home.comcast.net/>
S/MIME signature available upon request
"That's a funny thing to promise. Well, you can't never let anything
happen to him [Nemo]; then, nothing would ever happen to him." - Dory,
from the movie "Finding Nemo"
_______________________________________________
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.