Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPopUpButtonCell always select first item



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSPopUpButtonCell always select first item (From: Ivan C Myrvold <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.