• 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: Andrew White <email@hidden>
  • Date: Mon, 14 Mar 2005 08:32:20 +1100


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.

Partial solution:

I add an action / target pair to each menu _item_, then in the handler for that action check which menu item called the handler and set the selected item to that value. I still don't see a call to tableView:setObjectValue:forTableColumn:row.

What I don't understand is why I have to add all this infrastructure manually to NSPopUpButtonCell, while an NSPopUpButton created in IB 'just works'.

--
Andrew White

--------------------------------------------------------------------------
This email and any attachments are confidential. They may contain legally
privileged information or copyright material. You should not read, copy,
use or disclose them without authorisation. If you are not an intended
recipient, please contact us at once by return email and then delete both
messages. We do not accept liability in connection with computer virus,
data corruption, delay, interruption, unauthorised access or unauthorised
amendment. This notice should not be removed.
_______________________________________________
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: 
 >NSPopUpButtonCell in custom NSTableColumn in NSTableView - not changing value (From: Andrew White <email@hidden>)

  • Prev by Date: Re: [newbie:] elegant way using multithreading with NSThreads
  • Next by Date: Force an NSTextField to give up focus
  • Previous by thread: Re: 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