Re: Subclassing NSPopUpButton
Re: Subclassing NSPopUpButton
- Subject: Re: Subclassing NSPopUpButton
- From: Kyle Sluder <email@hidden>
- Date: Fri, 08 May 2015 12:49:12 -0500
On Fri, May 8, 2015, at 12:41 PM, Raglan T. Tiger wrote:
> > On May 8, 2015, at 10:55 AM, Kyle Sluder <email@hidden> wrote:
> >
> > In that case, the menu is running the runloop in event-tracking mode and pulling events for its own purpose.
>
>
> I create an NSMenu and populate it with NSMenuItem s and then set this
> menu to the NSPopUpButton.
>
> Would it make sense to use a subclass of NSMenu for this menu ... i.e.
> would I get keyDown events in this subclass?
No, because NSMenu doesn't work like a normal window/view.
I'd suggest looking around for that Xcode-alike implementation I
mentioned. Maybe someone else on the list recalls what I'm talking
about. It might involve overriding -sendEvent: in an NSApplication
subclass.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden