Re: NSComboBoxCell will not select
Re: NSComboBoxCell will not select
- Subject: Re: NSComboBoxCell will not select
- From: Ivan C Myrvold <email@hidden>
- Date: Wed, 27 Feb 2008 14:04:06 +0100
I found out at last that I had to set my class to be a data source,
and implement outlineView:setObjectValue:forTableColumn:byItem:
I still uses binding to bind the values of the cells, but it looks
like I in addition to that have to implement this method, to get it
working.
If not anyone have a better idea.
Ivan
Den 27. feb.. 2008 kl. 12:23 skrev Ivan C Myrvold:
I have problem with making a NSComboBoxCell keep the value selected.
Here is what I am doing:
I have an NSOutlineView, where the last column (Change To) is binded
to an NSTreeController (Value TreeController.arrangedObjects.c).
Some of the values in this column can have two or more values in a
row, so I have a method to replace the NSTextFieldCell with an
NSComboBoxCell when I have such
a value.
When I try to select a value in the combo box, as displayed here
with "spokeswoman":
http://www.myrvold.org/cocoa/comboBeforeSelect.jpg
I can see for a fraction of a second the new value "spokeswoman",
before it immediately changes back to the old value "spokesman":
http://www.myrvold.org/cocoa/comboAfterSelect.jpg
If I however doubleclicks in the combo box, and writes in a new
word, like this:
http://www.myrvold.org/cocoa/comboBeforeEnter.jpg
Then the new text sticks:
http://www.myrvold.org/cocoa/comboAfterEnter.jpg
If I use NSLog to see the indexOfSelectedItem of the combo box, it
is always -1.
Any ideas why the combo box cell have this behaviour?
Ivan
_______________________________________________
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
_______________________________________________
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