Re: NSPopUpButtonCell always select first item
Re: NSPopUpButtonCell always select first item
- Subject: Re: NSPopUpButtonCell always select first item
- From: Ivan C Myrvold <email@hidden>
- Date: Thu, 31 Jan 2008 18:02:22 +0100
On 31. jan.. 2008, at 17:05, Benjamin Stiglitz wrote:
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.
Ah, that was a great tip. I will try that.
- (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:
Yes, I have implemented this delegate method myself.
- (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