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

Re: NSLayoutManagers


  • Subject: Re: NSLayoutManagers
  • From: Brian Webster <email@hidden>
  • Date: Fri, 9 Aug 2002 14:40:44 -0500

My first inclination is that something is going awry in the way you're setting up your text system hierarchy. Like perhaps you're calling -[NSLayoutManager setTextStorage:] instead of -[NSLayoutManager replaceTextStorage:] or something like that. Could you post the code where you do your setup?

On Friday, August 9, 2002, at 02:09 PM, cocoa-dev-
email@hidden wrote:

I have some questions about the relationship between NSTestStorage and NSLayoutManagers. I have a pretty basic text editor in which I've implemented a concrete sub-class of NSTextStorage. In order to keep the coloring of the text up to date, I have chosen to send an invalidateDisplayForCharacterRange: message to the layoutmanager(s) from within the text storage. This seems pretty straight forward, as I just call [self layoutManagers] to create an array of layout managers. My first inclination was to place that in a for loop and send the message to every layout manager in the array. For some reason, however, the array is getting an invalid member, which is causing a run time error because "NSSubTextStorage" (which is NOT my subclass) does not respond to invalidateDisplayForCharacterRange. My answer to this is to simply send the message to the first layout manager. Does anyone know of any problems that might arise from just sending it to the first member of the array? !
I don't have multiple layouts in my view, so I shouldn't actually have to worry about multiple layout managers, but the Cocoa text system is so cryptic that I'm never confident that it won't try and pull something on me behind the scenes ;). Also, does anyone have any clue why I'd be getting an invalid member in my layout manager array?
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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: Re: FTPClient Beta Released - Please test
  • Next by Date: Re: FTPClient Beta Released - Please test
  • Previous by thread: NSLayoutManagers
  • Next by thread: RE: NSLayoutManagers
  • Index(es):
    • Date
    • Thread