• 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: NSTableView text editing notifications/delegation vs. attributed string cells?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView text editing notifications/delegation vs. attributed string cells?


  • Subject: Re: NSTableView text editing notifications/delegation vs. attributed string cells?
  • From: Jim Correia <email@hidden>
  • Date: Tue, 28 Feb 2006 13:20:52 -0500

On Feb 28, 2006, at 12:37 PM, Douglas Davidson wrote:

The methods you list above are those that the controls themselves (such as NSTableView) implement to receive delegate messages from the field editor; in these methods they then call out to their own delegates using methods like control:textShouldBeginEditing:. If you were implementing a table view subclass, you could override the NSText delegate methods, but that would have to be done with great care.

That was actually what prompted the question - more detail in a separate followup shortly (since it feels like a separate topic.)


If I did subclass NSTableView, then the interface says I am only guaranteed to get an NSText in the overridden method, but per your statements below, this will be an NSTextView in all normal situations.

Can you elaborate on the "done with great care" part? Besides making sure super gets the message as well when appropriate, what other things are there to watch out for?

The other thing is that in the AppKit as it stands, NSText is an abstract class; the concrete subclass used is NSTextView. The distinction between NSText and NSTextView is a historical artifact, and you may assume that field editors will be NSTextViews.

Thanks for the clarification.

Jim

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTableView text editing notifications/delegation vs. attributed string cells?
      • From: Douglas Davidson <email@hidden>
References: 
 >NSTableView text editing notifications/delegation vs. attributed string cells? (From: Jim Correia <email@hidden>)
 >Re: NSTableView text editing notifications/delegation vs. attributed string cells? (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: NSTableView text editing notifications/delegation vs. attributed string cells?
  • Next by Date: Re: NSTableView text editing notifications/delegation vs. attributed string cells?
  • Previous by thread: Re: NSTableView text editing notifications/delegation vs. attributed string cells?
  • Next by thread: Re: NSTableView text editing notifications/delegation vs. attributed string cells?
  • Index(es):
    • Date
    • Thread