Hello Martin, Thank you for your response.
> The text container isn't really responsible for that. It's job is to merely > define the geometric space available for text. I would expect you'll find it > easier to override NSTypesetter's > "willSetLineFragmentRect:forGlyphRange:etc:" method. I will check this out. > NSLayoutManager is touchy about changing NSTextContainer geometry during > layout, but I would expect it to be safe to do so in response to that > notification. Are you perhaps altering the contents of your NSTextStorage in > response to layout events/notifications? Can you post the full stack > backtrace for the exception? #0 0x92811e17 in objc_exception_throw #1 0x9071bf2b in +[NSException raise:format:arguments:] #2 0x9071bf6a in +[NSException raise:format:] #3 0x934598cc in _NSBlockNumberForIndex #4 0x93462baf in -[NSLayoutManager textContainerForGlyphAtIndex:effectiveRange:] #5 0x934629c8 in -[NSLayoutManager glyphRangeForTextContainer:] #6 0x0026d4ab in -[MyTestController textDidChange_private:] at MyTestController.m:2178 #7 0x0026d08d in -[MyTestController TT_TextStorageContentChanged:] at MyTestController.m:2017 This raises after changing text view container size ([__viewTextContainer setContainerSize:NSMakeSize(MAX_SIZE, MAX_SIZE)];), when calling [__viewLayoutManager glyphRangeForTextContainer:__viewTextContainer];. This (glyphRangeForTextContainer call) is required to use NSRect __realRec = [__viewLayoutManager usedRectForTextContainer:__viewTextContainer]; Rimas M. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com