Hello Mr. Ammon,
It does help. Thank you!
To test this out, I simply subclassed NSButton and only replaced the mouseDown:
method with the following:
- (void) mouseDown:(NSEvent *)theEvent
{
NSPopUpButtonCell *cell = [[NSPopUpButtonCell alloc] initTextCell:@""
pullsDown:NO];
NSMenu *tem
On Wed, Jan 13, 2010 at 11:59 AM, Peter Ammon wrote:
> Hi Eric,
>
> On SnowLeopard and later, use the NSMenu method popUpMenuPositioningItem:
> atLocation: inView:.
Don't forget to file a documentation bug about mentioning this new
method in the menu and popup list documentation.
--Kyle Sluder
Hi Eric,
On SnowLeopard and later, use the NSMenu method popUpMenuPositioningItem:
atLocation: inView:.
Before SnowLeopard, this is probably the easiest way:
NSPopUpButtonCell *cell = [[NSPopUpButtonCell alloc] initTextCell:@""
pullsDown:NO];
[cell setMenu:menu];
[cell performClickWithFrame:NS
In the 'Application Menu and Pop-up List Programming Topics for Cocoa' document
it says:
The preferred approach for programmatically displaying a non-contextual menu is
to create an NSPopUpButtonCell object, set its menu, and then call send a
attachPopUpWithFrame:inView: message to the pop-up b