[Biococoa-dev] Re: Re : Strange Selection Behavior when using a custom NSTextContainer
Koen van der Drift
kvddrift at earthlink.net
Tue Mar 28 21:09:06 EST 2006
On Mar 28, 2006, at 7:21 PM, Koen van der Drift wrote:
>
> On Mar 27, 2006, at 8:03 AM, Alexander Griekspoor wrote:
>
>> But the problem seems to be in the selection, not in drawing...
>
> That's true, but I think the selection gets it wrong because of
> whatever happens in lineFragmentRectForProposedRect. If you let
> that method return the value of the super instead of proposedRect,
> you will just get one column, but the selection is fine.
>
> BTW, I am amazed how little info and knowledge is available about
> this method. Do you want me to post it on the omni list as well?
Some more debugging (and that's it for today ;-) makes the
NSLayoutManager's functions boundingRectForGlyphRange: and
glyphIndexForPoint: also very suspicious. These functions return the
wrong value for the the charindex, thus resulting in a wrong value to
be shown (or not at all).
- Koen.
More information about the Biococoa-dev
mailing list