• 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: NSTextArea - how to change the text programmatically?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextArea - how to change the text programmatically?


  • Subject: Re: NSTextArea - how to change the text programmatically?
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 26 Feb 2012 18:57:31 -0800

On Feb 26, 2012, at 5:28 PM, William Squires wrote:

>  It's easy enough on an NSTextField (whether it's set up as a static label, or as a data-entry-type field), but where's the .text property of an NSTextArea?

NSTextView? The .textStorage property is an instance of NSTextStorage, a subclass of NSMutableAttributedString.

> Would an NSTextArea be better for this, or an NSTableView?

I suppose it depends on how much you want to be able to display. The nice thing about an NSTableView is that you can display a nearly infinite number of rows without consuming more memory, because only the visible rows consume resources. But if it’s only a small-to-medium amount of text, you could read the bytes and generate an NSString containing the hex dump, and put that into the view.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >NSTextArea - how to change the text programmatically? (From: William Squires <email@hidden>)

  • Prev by Date: Re: [Obj-C] if (self) vs. if (self != nil)
  • Next by Date: Re: NSTextArea - how to change the text programmatically?
  • Previous by thread: Re: NSTextArea - how to change the text programmatically?
  • Next by thread: issues using encodeWithCoder: with NSAttributedString for iOS
  • Index(es):
    • Date
    • Thread