Re: Dynamically populate a popup menu

2010-02-17 Thread Peter N Lewis
On 17/02/2010, at 15:53 , Graham Cox wrote: > On 17/02/2010, at 6:49 PM, Peter N Lewis wrote: > >> Is there any way to dynamically populate a popup menu on the fly (as it is >> exposed)? > > Look into the NSMenuDelegate protocol. It has methods to do what you want. Yes,

Re: Dynamically populate a popup menu

2010-02-17 Thread Graham Cox
On 18/02/2010, at 3:00 AM, Steven Degutis wrote: > While NSMenuDelegate isn't wrong per se, I still prefer to use the > NSPopUpButton's notification myself. Touching the button's internal menu > seems like dipping my fingers where they don't belong. NSMenuDelegate works fine with pop-up buttons

Re: Dynamically populate a popup menu

2010-02-17 Thread Jean-Daniel Dupas
ocol. > There is some method to dynamically populate the menu. > > Le 17 févr. 2010 à 16:09, Steven Degutis a écrit : > > > Check out NSPopUpButton's NSPopUpButtonWillPopUpNotification > > > > On Wed, Feb 17, 2010 at 2:49 AM, Peter N Lewis > > wrote: &

Re: Dynamically populate a popup menu

2010-02-17 Thread Steven Degutis
ee NSMenuDelegate protocol. > There is some method to dynamically populate the menu. > > Le 17 févr. 2010 à 16:09, Steven Degutis a écrit : > > > Check out NSPopUpButton's NSPopUpButtonWillPopUpNotification > > > > On Wed, Feb 17, 2010 at 2:49 AM, Peter N Lewis >

Re: Dynamically populate a popup menu

2010-02-17 Thread Jean-Daniel Dupas
any way to dynamically populate a popup menu on the fly (as it is >> exposed)? >> >> For example, a popup menu that displayed the harddisk hierarchy would need >> this sort of thing - you wouldn't want the entire thing populated as soon as >> you click the popu

Re: Dynamically populate a popup menu

2010-02-17 Thread Steven Degutis
Check out NSPopUpButton's NSPopUpButtonWillPopUpNotification On Wed, Feb 17, 2010 at 2:49 AM, Peter N Lewis wrote: > Is there any way to dynamically populate a popup menu on the fly (as it is > exposed)? > > For example, a popup menu that displayed the harddisk hierarchy would

Re: Dynamically populate a popup menu

2010-02-16 Thread Graham Cox
On 17/02/2010, at 6:49 PM, Peter N Lewis wrote: > Is there any way to dynamically populate a popup menu on the fly (as it is > exposed)? Look into the NSMenuDelegate protocol. It has methods to do what you want. --Graham___ Cocoa-dev mailin

Dynamically populate a popup menu

2010-02-16 Thread Peter N Lewis
Is there any way to dynamically populate a popup menu on the fly (as it is exposed)? For example, a popup menu that displayed the harddisk hierarchy would need this sort of thing - you wouldn't want the entire thing populated as soon as you click the popup menu, it would take forever an