• 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
line numbering and nstextview subclassing (newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

line numbering and nstextview subclassing (newbie)


  • Subject: line numbering and nstextview subclassing (newbie)
  • From: Afonso Salcedo <email@hidden>
  • Date: Thu, 4 Jul 2002 19:19:05 +0000

hi all,

i was wondering if anyone could give me some hints on how to implement a column for line numbering on the left side of a TextView... something that would work in the same manner as BBEdit's line numbering...

what I have now is a NSTableView on the left side and a subclass of a NSTextView on the right... I subclassed NSTextView as it was the only way I could think of, to listen to a "return" keyboard event, so that when the user types a return, a new line appears on the NSTableView....

Even so, it still doesn't work very well... I am having trouble to update the table using reloadData: from inside the NSTextView subclass, and I'm also having trouble typing text inside the NSTextView... apparently, when I subclassed this view, it lost the scrolling ability, and how to react to certain characters like "backspace", "delete" or the "arrow keys"...

I am sure this is not the correct way to do this, but it's late and I can't think straight anymore :) If anyone could give me some hints on how to proceed I will greatly appreciate it...

Thank you!
Afonso
_______________________________________________
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: Font Menu validation bug?
  • Next by Date: Re: Cocoa stripping resource forks: does Jaguar fix?
  • Previous by thread: Accessing PDF files
  • Next by thread: What is a marked text in NSTextView
  • Index(es):
    • Date
    • Thread