• 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
NSPopUpButton when to addItemsWithTitles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Transparent Text Fill Color
  • Next by Date: When is -validateForUpdate: invoked?
  • Previous by thread: Re: Transparent Text Fill Color
  • Next by thread: NSPopUpButton when to addItemsWithTitles
  • Index(es):
    • Date
    • Thread