• 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: Sat, 01 Mar 2003 14:18:22 -0500

Here's a demo app with how I am currently implementing line numbers in
NSTextView instances. The JSDTextView class is the heart of it, and the rest
is an easy-to-build sample application.

http://homepage.apple.com/balthisar/DemoLineNumberNoWrapText.dmg

It's a small, compressed disk image.

Some of its highlights are:
(1) line numbering (can be turned on or off)
(2) word wrapping can be turned on or off.
(3) the line number space changes size according to the width required.
(4) it's pretty well documented, probably to the disgust of all of the
"real" C programmers out there. Seems every time I see C code
there's nary a comment, whereas I comment every function and almost
every line of code.


And finally, Koen, all my thanks go out to you.


On 3/1/03 7:59 AM, "Koen van der Drift" <email@hidden> wrote:

>
>> I'll post a link for a source code and a demo in a few days when I separate
>> it from my project.
>
> That would be great. It's actually how I started to approach the problem,
> but I never could get both views in sync with the NSScroller, so I came up
> with my current solution. I am curious to see how you solved that problem.
>
>
> - 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.

  • Prev by Date: Re: adding charactersets
  • Next by Date: Re: discards qualifiers from pointer target type
  • Previous by thread: Unusual drag and drop problem
  • Next by thread: Re: NSTextView and Line Numbering
  • Index(es):
    • Date
    • Thread