• 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
Re: NSComboBoxDataSource problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSComboBoxDataSource problems


  • Subject: Re: NSComboBoxDataSource problems
  • From: "Allen Curtis" <email@hidden>
  • Date: Tue, 26 Aug 2008 10:53:57 -0700

That was it!  The datasource was at the cell level, not the combobox itself.

Thanks
Allen

On Tue, Aug 26, 2008 at 10:45 AM, Fritz Anderson <email@hidden> wrote:
On 26 Aug 2008, at 11:12 AM, Allen Curtis wrote:

I am writing my first Cocoa application and I am trying to dynamically fill a ComboBox. In order to do this I implemented the required methods in my <NDA> implementation as follows:

 - (NSInteger)numberOfItemsInComboBox:(NSComboBox *)aComboBox
...


 - (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)index
...

When I run the program the console displays the message:
 2008-08-26 08:59:46.417 CSAFEApp[14163:10b] *** Illegal NSComboBoxCell data source (<MyController:   0x134360>).  Must implement numberOfItemsInComboBoxCell: and comboBoxCell:objectValueForItemAtIndex:

The selectors shown in the error log do not match the selectors of the methods in your message. The required methods have "Cell" in them. Your method names do not.

You seem to have connected the data-source outlet to the _cell_ of your combo box, rather than to the combo box itself. The methods in your message are for NSComboBox. In Interface Builder, select the NSComboBoxCell (the outline view may help you), and disconnect the dataSource outlet. Then select the NSComboBox and connect its dataSource outlet to your delegate.

       — F

 --
Fritz Anderson -- Xcode 3 Unleashed: Now Available -- http://x3u.manoverboard.org/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSComboBoxDataSource problems (From: "Allen Curtis" <email@hidden>)
 >Re: NSComboBoxDataSource problems (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: NSComboBoxDataSource problems
  • Next by Date: ERROR - upgrade version of xcode
  • Previous by thread: Re: NSComboBoxDataSource problems
  • Next by thread: custom application bundle structure
  • Index(es):
    • Date
    • Thread