• 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: NSMutableAttributedString binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMutableAttributedString binding


  • Subject: Re: NSMutableAttributedString binding
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 10 Jan 2008 11:32:21 -0800


On Jan 10, 2008, at 11:28 AM, Ivan C Myrvold wrote:

OK, I did follow your advice, and tried

NSMutableAttributedString *astr = [oattributedTextView textStorage];
[astr replaceCharactersInRange:elementRange withString:[te c]];

where oattributedTextView is the outlet of the NSTextView.

Now, I got the change immediately shown in my NSTextView.

Be sure to read the text system documentation on working with the text storage. There are a number of useful things to note--for example, multiple changes can be grouped for efficiency by surrounding them with beginEditing/endEditing calls. If your text view is editable and you wish your changes to participate in undo etc. alongside other user changes, you need to notify the text view with should-change/did- change calls.


Douglas Davidson

_______________________________________________

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: 
 >NSMutableAttributedString binding (From: Ivan C Myrvold <email@hidden>)
 >Re: NSMutableAttributedString binding (From: Douglas Davidson <email@hidden>)
 >Re: NSMutableAttributedString binding (From: Ivan C Myrvold <email@hidden>)

  • Prev by Date: Re: NSMutableAttributedString binding
  • Next by Date: Re: Unable to get event for shutdown/restart using QA1340
  • Previous by thread: Re: NSMutableAttributedString binding
  • Next by thread: Re: NSMutableAttributedString binding
  • Index(es):
    • Date
    • Thread