Re: NSTextView and Line Numbering
Re: NSTextView and Line Numbering
- Subject: Re: NSTextView and Line Numbering
- From: James Derry <email@hidden>
- Date: Sun, 23 Feb 2003 10:25:24 -0500
Hi again Koen,
I'm impressed with the results. My NSString doesn't have a strip method, but
I worked my way around that.
I am having a little bit of difficulty with the pasting text into the
TextView with the line numbers displayed. Do you get strange behavior? If I
step through lineFragmentRectForProposedRect:, it always properly returns
the correct corrected rectangle, but I get two types of misbehavior: (1) if
I paste in multiple lines, all of the text appears shifted to the left UNDER
the "left margin" area. If I paste in a single line, it appears okay, but
further lines have the insertion point shifted to the right by the "left
margin" distance -- but when typed is inserted into the correct spot.
I'll work it out somehow -- your code was a perfect start -- but I was
curious if you had this same behavior.
Thanks!
On 2/21/03 2:13 PM, "Koen van der Drift" <email@hidden> wrote:
>
> Thanks! I'll give this a workout!
>
>
>
> And Jirtme Laurens (who also answered this), thanks as well. I was kind of
>
> worried about your suggestion, thinking I'd have to parse through thousands
>
> of glyphs anytime a character changed. But I see what Koen did to eliminate
>
> most of that.
>
>
>
Glad I could help, let me know if it worked and if you found any
>
improvements/errors in my code ;)
>
>
>
- Koen.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.