• 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: Possible causes of "attempted layout while textStorage is editing"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible causes of "attempted layout while textStorage is editing"?


  • Subject: Re: Possible causes of "attempted layout while textStorage is editing"?
  • From: Gideon King <email@hidden>
  • Date: Thu, 01 Sep 2011 22:31:41 +1000

Hmmm, I see that there is a place in my code where they can be editing the text view, and then they mouse down in its containing view, and that triggers an event to be posted through NSApp at the end of the event queue and an autorelease being sent to the enclosing view which would eventually result in the text view being removed, while that event could trigger a glyphRangeForTextContainer call. I guess that might leave things open to the possibility of something still being edited when I am working with the text.

I think I'll try using ensureLayoutForTextContainer: and then removing the text view from its superview, so nothing else can possibly happen to the text after that (I hope...)

Thanks for your help with this Jonathan.

Gideon




On 01/09/2011, at 8:52 PM, email@hidden wrote:

>
>
> Is it possible that the user is editing the textview when this code is triggered?
> From the looks of the trace you react directly to the mouseDown event in another view which might not give NSTextView opportunity to conclude its edit.
> I would schedule my layout manipulation on the runloop and see if that  helps.
>
> Regards
>
> Jonathan
_______________________________________________

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: Possible causes of "attempted layout while textStorage is editing"?
      • From: Martin Wierschin <email@hidden>
References: 
 >Re: Possible causes of "attempted layout while textStorage is editing"? (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: setTitleWithMnemonic -- warning for deprecated API .
  • Next by Date: Re: Won't Applescript command use defined ivars?
  • Previous by thread: Re: Possible causes of "attempted layout while textStorage is editing"?
  • Next by thread: Re: Possible causes of "attempted layout while textStorage is editing"?
  • Index(es):
    • Date
    • Thread