Re: NSTableView/NSPopUpButtonCell Mysteries
Re: NSTableView/NSPopUpButtonCell Mysteries
- Subject: Re: NSTableView/NSPopUpButtonCell Mysteries
- From: Daniel Todd Currie <email@hidden>
- Date: Mon, 16 Feb 2004 15:10:41 -0800
There is a separator item in my popup cell menu, and whenever the menu
is edited such that a separator item is selected, I want to change the
selection. However, since the menu is editable, the separator will not
always be in the same place.
Yes, I could compare the selected index to the number of items before
the separator, but I feel a bit more confident in actually returning
the selected menu item and checking to see if it is a separator.
Thoughts?
On 2004 Feb 16, at 14:43, mmalcolm crawford wrote:
On Feb 16, 2004, at 2:18 PM, Daniel Todd Currie wrote:
So the only way to get the popup cell's selected item is by checking
the data source array? If I do this, I have to make some awfully
ugly code when I want to return the selected NSMenuItem, in
pseudocode:
[[[table column] datacell] menuItemAtIndex:[[[tableData objectAtRow]
objectForKey:column] intValue]]
It's not clear why you need to get the selected menu item rather than
just asking the model data for the value? What is there in the UI
that would be different from the model?
mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.