• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSComboBoxCell will not select
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSComboBoxCell will not select


  • Subject: NSComboBoxCell will not select
  • From: Ivan C Myrvold <email@hidden>
  • Date: Wed, 27 Feb 2008 12:23:40 +0100

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


  • Follow-Ups:
    • Re: NSComboBoxCell will not select
      • From: Ivan C Myrvold <email@hidden>
  • Prev by Date: Re: Help with PDFPage to NSImage
  • Next by Date: Re: NSStringFromClass versus className ?
  • Previous by thread: Re: Help with PDFPage to NSImage
  • Next by thread: Re: NSComboBoxCell will not select
  • Index(es):
    • Date
    • Thread