Re: NSPopUpButtonCell in custom NSTableColumn in NSTableView - not changing value
Re: NSPopUpButtonCell in custom NSTableColumn in NSTableView - not changing value
- Subject: Re: NSPopUpButtonCell in custom NSTableColumn in NSTableView - not changing value
- From: stephane sudre <email@hidden>
- Date: Fri, 11 Mar 2005 15:35:32 +0100
On Mar 11, 2005, at 3:17 PM, Andrew White wrote:
I've created a custom subclass of NSTableColumn to allow me to have a
different popup menu for each cell. I override dataCellByRow and add
a setDataCellByRow method. I can populate the cell fine, but whenever
I try to change the value it immediately flicks back to the original
value. I assume I've missed something in the event handling / action
chain, but I'm not sure what.
What do I need to do to allow an NSPopupCell created via [NSPopupCell
initWithText: @"blah" pullDown: NO] to keep its value? By the time I
call
- (id) tableView: (NSTableView *) aTableView
objectValueForTableColumn: (NSTableColumn *) aTableColumn
row: (int) rowIndex
the value of [selected cell] seems to have reverted to its orginal
value, not the one I changed it to.
For reference: enabled is true, and
- (void) tableView: (NSTableView *) aTableView
setObjectValue: (id) anObject
ForTableColumn: (NSTableColumn *) aTableColumn
row: (int) rowIndex
is never called.
The answer is in the line above.
_______________________________________________
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