• 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: ColorCell, NSActionCell subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ColorCell, NSActionCell subclass


  • Subject: Re: ColorCell, NSActionCell subclass
  • From: Carl Gieringer <email@hidden>
  • Date: Tue, 19 Apr 2005 13:33:18 -0800

For posterity:

The technique that John Harte uses appears to be the best option so far. As far as I can tell, NSTableView is only friendly towards text cells that want to edit themselves. It does this by setting up the field editor when a user double clicks on a text cell for which the table view is the delegate. To have a color cell that had similar behavior but for colors, NSTableView would need to have code for setting up a color panel and listening to it (it would pass along any new colors to its data source, or to its bound values in the case of bindings.) Since NSTableView does not have this capability, having a separate object control the process is easiest right now. If one were to try to add this ability to a table view, I believe that

- (void)editColumn:(int)columnIndex row:(int)rowIndex withEvent:(NSEvent *)theEvent select:(BOOL)flag

would be the correct method to override. This is the method that sets up the field editor, and so it would be the correct place for a table view subclass to grab a color cell's edit.

peace on earth, goodwill toward mankind etc. etc.

_______________________________________________
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


References: 
 >ColorCell, NSActionCell subclass (From: Carl Gieringer <email@hidden>)
 >Re: ColorCell, NSActionCell subclass (From: Carl Gieringer <email@hidden>)

  • Prev by Date: Re: NSBrowser action
  • Next by Date: ABPeoplePickerView: setting focus on the search field
  • Previous by thread: Re: ColorCell, NSActionCell subclass
  • Next by thread: MainMenu binding with multiple documents
  • Index(es):
    • Date
    • Thread