• 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: printing the standard output in a NSTextview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: printing the standard output in a NSTextview
      • From: Douglas Davidson <email@hidden>
    • [OT] "Cocoa in a Nutshell" is great!
      • From: Oleg Svirgstin <email@hidden>
References: 
 >printing the standard output in a NSTextview (From: Martin Marier <email@hidden>)

  • Prev by Date: Re: Declarations in middle of C code?!
  • Next by Date: Chicago Meeting Tuesday January 6th @ 6:00 PM
  • Previous by thread: printing the standard output in a NSTextview
  • Next by thread: [OT] "Cocoa in a Nutshell" is great!
  • Index(es):
    • Date
    • Thread