Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding NSPopupButton



Title: Binding NSPopupButton
I'm having a little problem binding an NSPopupButton to an NSArrayController.   The problem is that when I first click the popup, I see an extra item at the bottom called "No Value".  If I choose one of the other items, then the next time I click the popup, the "No Value" is gone and everything is good.  Does anyone understand why the "No Value" item ever gets put into the menu?

P.S. I just had to share that yesterday, I spent nearly the entire day trying to solve a different problem, which I *thought* was related to bindings:  I was adding multiple items with the same name to an NSPopupButton, and I could not for the life of me figure out why I only saw one item in the popup.  I assumed it was due to me improperly setting up my bindings, and since bindings are new to me, this was a natural assumption.  However, the real cause of the problem had nothing to do with my bindings, they were fine.  The problem was (have you already guessed?), an NSPopupMenu will not accept the addition of a new item that has the same string as an item that is already in the menu.  Man....
--
Larry Gerndt
AIM Handle: SonOfTheSonOfMan
Let the truth be told though the heavens fall -- James Garrison
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.