• 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
selectItemWithObjectValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: selectItemWithObjectValue
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Question about NSScrollView
  • Next by Date: Re: Customizing how errors are presented
  • Previous by thread: Re: How to relayout content of NSTextView so that my tab characters are drawn with width of 4 characters
  • Next by thread: Re: selectItemWithObjectValue
  • Index(es):
    • Date
    • Thread