• 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: NSTextStorage Problems - re-post
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextStorage Problems - re-post


  • Subject: Re: NSTextStorage Problems - re-post
  • From: Brock Brandenberg <email@hidden>
  • Date: Tue, 25 Jun 2002 14:21:59 -0500

Hi Josh.

I assume that you're bracketing all of your calls to your NSTextStorage with
[textStorage beginEditing] and [textStorage endEditing]? If not, you need
to.

If you are, then you need to be very careful what you do inside of these
beginEditing/endEditing bracket calls because certain methods may cause a
number of "behind-the-scenes" notifications to occur between the
NSTextStorage, the NSTextContainer, the NSLayoutManager and the NSTextView
objects before the [textStorage endEditing] call executes. If you're calling
one of your own functions inside of these bracket calls, you may be
manipulating one of the text hierarchy objects (NSTextStorage,
NSTextContainer, NSLayoutManager or NSTextView) that, in turn, causes more
notifications between the hierarchy objects before they have had time to
finish updating their states in response to the first calls inside the
beginEditing/endEditing bracket calls.

This is a little hard for me to describe, but I hope it gets the general
concept across.

Brock Brandenberg

----- industrial design @ www.bergdesign.com ------
_______________________________________________
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.

  • Prev by Date: Parsing XML
  • Next by Date: Re: NSTableView philosophy question.. (MVC Pattern) where to put the dataSource delegate?
  • Previous by thread: NSTextStorage Problems - re-post
  • Next by thread: Re: NSTextStorage Problems - re-post
  • Index(es):
    • Date
    • Thread