Creating popup button's menu at the last moment
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