selectItemWithObjectValue
selectItemWithObjectValue
- Subject: selectItemWithObjectValue
- From: David Blanton <email@hidden>
- Date: Fri, 19 Feb 2010 10:24:08 -0700
I get this warning, but I never call these methods:
2010-02-19 09:56:29.975 Customize It[338:10b] *** -[NSComboBoxCell
selectItemWithObjectValue:] should not be called when usesDataSource
is set to YES
2010-02-19 09:56:29.976 Customize It[338:10b] *** -[NSComboBoxCell
indexOfItemWithObjectValue:] should not be called when usesDataSource
is set to YES
I do call
[self setStringValue:@"Normal"];
[self selectItemWithObjectValue:@"Normal"];
where self is a subclass of NSComboBox. According to the docs this is
one way of setting a combo box value that works for both internal and
external data sources.
So, I am wondering why the warning ... I like to clear all warnings :)
-db
From the docs:
And this code initializes the combo box’s text field to “Red” and
selects it from the list if available. Note that this works for combo
boxes with either internal or external data sources:
[myComboBox setStringValue:@"Red"];
[myComboBox selectItemWithObjectValue:@"Red"];_______________________________________________
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