• 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: NSTextView and Line Numbering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSTextView and Line Numbering
      • From: Koen van der Drift <email@hidden>
  • Prev by Date: NSStatusBar limit?
  • Next by Date: Re: Project Builder won't launch
  • Previous by thread: Re: NSTextView and Line Numbering
  • Next by thread: Re: NSTextView and Line Numbering
  • Index(es):
    • Date
    • Thread