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 (Cocoa-dev@lists.apple.com)
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/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]