On Jun 12, 2014, at 11:25 AM, Kyle Sluder <k...@ksluder.com> wrote:

>>> For some reason it doesn't like the below - you need to comment that out, 
>>> and uncheck that option in IB:
>>> 
>>> self.textView.layoutManager.allowsNonContiguousLayout = YES;
>>> 
>>> At least that's how I fixed it :) Not sure why it doesn't like that 
>>> property when using IB. 
>> 
>> That's not fixing it, it's just avoiding the problem. "Fast" has it
>> enabled. It's on by default in every text view.
> 
> Well, what if you don't use that, and instead just send
> -ensureLayoutForCharactersInRange: to the text view's layout manager?

Why would I want to? That'd block the calling thread until the layout was done, 
which defeats the purpose of allowing non-contiguous layout.


The "Fast" and "Slow" setups are intended to be identical. The only difference 
is who creates and connects the objects. If I do it, everything works fine. If 
I let Cocoa do it, it spins for far longer than it should. (Laying out the 
entire document on my machine takes about 30 seconds, but in the "Slow" project 
when locked up, it'll spin for ages and "never" finish. It's stuck in 
_insertionPointHelperForGlyphAtIndex called by 
boundingRectForGlyphRange:inTextContainer:, the latter of which has a perfectly 
reasonable and small glyph range request.)


--
Seth Willits


_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to