NSLayoutManagers
NSLayoutManagers
- Subject: NSLayoutManagers
- From: "Josh Ferguson" <email@hidden>
- Date: Fri, 9 Aug 2002 12:16:03 -0500
- Priority: normal
- Thread-topic: NSLayoutManagers
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?
TIA!
Josh Ferguson
_______________________________________________
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.