• 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: NSTextView question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView question...


  • Subject: Re: NSTextView question...
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 6 Oct 2003 10:33:29 -0700

On Sunday, October 5, 2003, at 07:38 PM, Alex Lock wrote:

I want to be able to dynamically put text in a text field, but I do NOT want said field to be editable. It seems when disabling editability in IB it also makes the textView insertString: message stop working. So, how does one accomplish this seemingly easy goal?

Generally speaking, most of the methods on NSTextView are designed around user interaction. For programmatic changes to the text, I recommend dealing with the model directly, i.e. modifying the NSTextStorage using NSMutableAttributedString methods. Just remember to bracket changes with calls to beginEditing and endEditing.

Douglas Davidson
_______________________________________________
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: 
 >NSTextView question... (From: Alex Lock <email@hidden>)

  • Prev by Date: Re: outlet strangeness..
  • Next by Date: Re: NSImageCells in NSMatrix - Retaining focus ring while redrawing a window
  • Previous by thread: Re: NSTextView question...
  • Next by thread: Does cross-development in Xcode work ?
  • Index(es):
    • Date
    • Thread