Re: Displaying a non-contentual menu & attachPopUpWithFrame

2010-01-15 Thread Eric Gorr
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

Re: Displaying a non-contentual menu & attachPopUpWithFrame

2010-01-13 Thread Kyle Sluder
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

Re: Displaying a non-contentual menu & attachPopUpWithFrame

2010-01-13 Thread Peter Ammon
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

Displaying a non-contentual menu & attachPopUpWithFrame

2010-01-13 Thread Eric Gorr
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