Re: ColorCell, NSActionCell subclass
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