On Dec 21, 2010, at 8:08 PM, Brad Stone wrote:

> I have an NSTextView that has about 1,900 characters in it.  Just regular 
> text.  If I edit the text and save my app hangs at  [[self 
> managedObjectContext] commitEditing];  I found setting nonContinuousLayout to 
> NO in the NSTextView prevents the hang but that's not really solving the 
> problem.
> 
> Here's what's strange.  If I expand the window so the all the text shows 
> without the scroll bar it doesn't hang.  If I edit the same text but scroll 
> down the get it I get a hang.  If I set nonContiguousLayout to NO it doesn't 
> hang in either scenario.
> 
> What advice can anyone give as to how I can address this problem?

The obvious workaround to try would be to call [layoutManager 
ensureLayoutForCharacterRange:NSMakeRange(0, textLength)] at some point before 
you save.  That will cause the entire text to be laid out, as it would be if 
the window showed all of it.  It would also be helpful if you could file a bug 
with enough information to reproduce this.

Douglas Davidson

_______________________________________________

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

Reply via email to