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

Re: Text layout responsibility


  • Subject: Re: Text layout responsibility
  • From: Rimas <email@hidden>
  • Date: Fri, 12 Dec 2008 12:09:04 +0200

> My suspicion is that you are
> modifying the contents of the NSTextStorage or changing the NSTextContainer
> geometry in response to a layout event. You cannot safely do either while
> layout is active on the stack.

Here is the stack:

#0	0x92811e17 in objc_exception_throw
#1	0x9071bf2b in +[NSException raise:format:arguments:]
#2	0x9071bf6a in +[NSException raise:format:]
#3	0x934598cc in _NSBlockNumberForIndex
#4	0x938944cc in -[NSLayoutManager(NSPrivate)
_invalidateLayoutForExtendedCharacterRange:isSoft:invalidateUsage:]
#5	0x93490a48 in -[NSLayoutManager(NSPrivate)
_invalidateLayoutForExtendedCharacterRange:isSoft:]
#6	0x9349271f in -[NSLayoutManager textContainerChangedGeometry:]
#7	0x9348a92b in -[NSTextContainer setContainerSize:]
#8	0x0026d71a in -[MyTestController textDidChange_private:] at
MyTestController.m:2238
#9	0x0026cbdd in -[MyTestController _TextStorageContentChanged:] at
MyTestController.m:2017
#10	0x961632dc in _nsnote_callback
#11	0x90683aba in __CFXNotificationPost
#12	0x90683d93 in _CFXNotificationPostNotification
#13	0x96160440 in -[NSNotificationCenter postNotificationName:object:userInfo:]
#14	0x96169c88 in -[NSNotificationCenter postNotificationName:object:]
#15	0x935450b5 in -[NSTextStorage processEditing]
#16	0x934749cf in -[NSTextStorage endEditing]
#17	0x93542e8d in -[NSTextView insertText:replacementRange:]
#18	0x935423d3 in -[NSTextView insertText:]
#19	0x93541efa in
-[NSKeyBindingManager(NSKeyBindingManager_MultiClients)
flushTextForClient:]
#20	0x9354044f in -[NSTSMInputContext interpretKeyEvents:]
#21	0x9353ff1a in -[NSView interpretKeyEvents:]
#22	0x9353fe2a in -[NSTextView keyDown:]
#23	0x003a8cca in -[MyTextView keyDown:] at MyTextView.m:896
#24	0x934b03a5 in -[NSWindow sendEvent:]
#25	0x002e9d98 in -[MyDocumentWindow sendEvent:] at MyDocumentWindow.m:85
#26	0x9347c311 in -[NSApplication sendEvent:]
#27	0x0007d420 in -[MyApplication sendEvent:] at MyApplication.m:1174
#28	0x933d9d0f in -[NSApplication run]
#29	0x933a6f14 in NSApplicationMain
#30	0x0001705b in main at main.m:106


I am trying to change TextContainer size via [__viewTextContainer
setContainerSize:__sizeToSet]; And this is called in response to
NSTextStorageDidProcessEditingNotification.

The reason I need to change container size, is to update it to keep
all entered text. All the time I am keeping text container as small as
it is possible.

Rimas M.
_______________________________________________

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

  • Follow-Ups:
    • Re: Text layout responsibility
      • From: Martin Wierschin <email@hidden>
References: 
 >Text layout responsibility (From: Rimas <email@hidden>)
 >Re: Text layout responsibility (From: Martin Wierschin <email@hidden>)
 >Re: Re: Text layout responsibility (From: Rimas <email@hidden>)
 >Re: Text layout responsibility (From: Martin Wierschin <email@hidden>)

  • Prev by Date: Re: Text layout responsibility
  • Next by Date: Re: Text layout responsibility
  • Previous by thread: Re: Text layout responsibility
  • Next by thread: Re: Text layout responsibility
  • Index(es):
    • Date
    • Thread