Re: Subclassing NSPopUpButton
Re: Subclassing NSPopUpButton
- Subject: Re: Subclassing NSPopUpButton
- From: Kyle Sluder <email@hidden>
- Date: Fri, 08 May 2015 11:55:17 -0500
On Fri, May 8, 2015, at 11:42 AM, Raglan T. Tiger wrote:
> I have subclassed NSPopUpButton. In the subclass drawRect:dirtyRect is
> called ... I did this just to check that the subclass is properly
> implemented.
>
> In the subclass keyDown:theEvent is not being called. How does one
> override this method for an NSPopUPButton subclass?
>
> The purpose for overriding keyDown:theEvent is to create my own search
> string to find items in the menu.
This sounds like a feature that exists in Xcode, which implies you're
trying to do this while the menu is visible. In that case, the menu is
running the runloop in event-tracking mode and pulling events for its
own purpose. The window containing the popup button is (conceptually, if
not in actuality) no longer key.
I believe someone has implemented a workalike to the Xcode
functionality.
--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