• 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: NSPopUpButtonCell in custom NSTableColumn in NSTableView - not changing value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSPopUpButtonCell in custom NSTableColumn in NSTableView - not changing value
      • From: Andrew White <email@hidden>
References: 
 >NSPopUpButtonCell in custom NSTableColumn in NSTableView - not changing value (From: Andrew White <email@hidden>)

  • Prev by Date: Re: NSGLImage doesnt open large images
  • Next by Date: Re: simple AppKit / multithreading question
  • Previous by thread: NSPopUpButtonCell in custom NSTableColumn in NSTableView - not changing value
  • Next by thread: Re: NSPopUpButtonCell in custom NSTableColumn in NSTableView - not changing value
  • Index(es):
    • Date
    • Thread