i never get even the “titleOfSelectedItem” nor “indexOfSelectedItem”
why ?
if i try :
@choixTheme.addItem(“Unbelievable”)
i get an error :
/Library/Frameworks/RubyCocoa.framework/Versions/A/Resources/ruby/osx/ob
jc/oc_wrapper.rb:17:in `NSApplicationMain’: NSApplicationMain -
RBException_OSX::OCMessageSendException - NSPopUpButton#addItem: -
methodSignature is nil. (OSX::OCException)
then, what’s the correct way to setup all the items of a NSPopUpButton
programmatically ?
I “removeAllItems” because there are some in it when I create it in
InterfaceBuilder, and I just didn’t care to bother figuring out how to
place a completely empty pop-up button. Also, I sometimes refresh
it, and just emptying it and refilling from scratch is easier than
modifying what’s there.
I “removeAllItems” because there are some in it when I create it in
InterfaceBuilder, and I just didn’t care to bother figuring out how to
place a completely empty pop-up button. Also, I sometimes refresh
it, and just emptying it and refilling from scratch is easier than
modifying what’s there.
I’m sure there are other ways to do this as well.
fine, thanks, i didn’t notice the “s” in “removeAllItems”, i have to
learn how to read the classes/methods browser (AppKiDo)
because i’m using a loop : @choixTheme.removeAllItems