• 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
Creating popup button's menu at the last moment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating popup button's menu at the last moment


  • Subject: Creating popup button's menu at the last moment
  • From: Harilaos Skiadas <email@hidden>
  • Date: Wed, 15 Sep 2004 23:19:42 -0700 (PDT)

Hi all,

  I have the following "problem": I have a popup
button, whose menu would have to be updated very
regularly, while the popup button gets used very
rarely. I was wondering if there is a way to create
the menu at the last moment so to speak. I would like
it if I could detect when the user clicks on the popup
button and create the menu then.
If that won't work, will I have to subclass
NSPopUpButton to tell it where to get its menu from?
The point is that the way the thing is set up now, I
have my own class that handles an array, and I would
like to create a menu with entries from that array
only if it is really necessary, so I can't just link
the button with a menu class.
My recent experience has told me that very often one
can get away without subclassing though, so I was
hoping I could avoid it.

thanks,
Haris




__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.
http://messenger.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Creating popup button's menu at the last moment
      • From: Martin Wennerberg <email@hidden>
  • Prev by Date: Re: Using External C Libraries with Objective-C
  • Next by Date: Re: modifying self in init
  • Previous by thread: Catching Up/Arrow key presses in a text field
  • Next by thread: Re: Creating popup button's menu at the last moment
  • Index(es):
    • Date
    • Thread