NSPopUpButton when to addItemsWithTitles
NSPopUpButton when to addItemsWithTitles
- Subject: NSPopUpButton when to addItemsWithTitles
- From: "Barry" <email@hidden>
- Date: Wed, 4 Jul 2007 13:12:24 +0100
Hi
I have a simple window with an NSPopUpButton.
I need to initialise the list when the Document is opened - the list is
dependent on the file just opened.
I have added the code
[myPopUp removeAllItems];
[myPopUp addItemsWithTitles: myNames];
at the end of
readFromData
in MyDocument.mm
However, this doesn't work. I still see the default Item1, 2 & 3.
I happen to have another Button (just a NSButton) & if I add my code
[myPopUp removeAllItems];
[myPopUp addItemsWithTitles: myNames];
to that action it works!
So, its timing. Where do I put my code to update the PopUpButton contents
???
Thanks in advance
_______________________________________________
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