• 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 always select first item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPopUpButtonCell always select first item


  • Subject: Re: NSPopUpButtonCell always select first item
  • From: Benjamin Stiglitz <email@hidden>
  • Date: Thu, 31 Jan 2008 08:05:09 -0800

I am baffled by this, and have not been able to find out why this happens.
I of course wants the menu item I selects to be shown after I have selected it.

Does your outline view delegate implement - outlineView:setObjectValue:forTableColumn:byItem:? If not, the outline view will reset the cell’s object value at the end of editing to the the value specified by the data source.


- (id)tableColumn:(NSTableColumn *)column inOutlineView: (NSOutlineView *)outlineView dataCellForRow:(int)row {

I assume this is something you’re implementing on your own? The outline view delegate supports:
- (NSCell *)outlineView:(NSOutlineView *)outlineView dataCellForTableColumn:(NSTableColumn *)tableColumn item:(id)item;


You can return the default value (what you’re using otextFieldCell for now) with -[NSTableColumn dataCellForRow:].

-Ben_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSPopUpButtonCell always select first item
      • From: Ivan C Myrvold <email@hidden>
References: 
 >NSPopUpButtonCell always select first item (From: Ivan C Myrvold <email@hidden>)

  • Prev by Date: Re: programming in C++ ?
  • Next by Date: Re: killing background processes with UNIX in cocoa?
  • Previous by thread: NSPopUpButtonCell always select first item
  • Next by thread: Re: NSPopUpButtonCell always select first item
  • Index(es):
    • Date
    • Thread