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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to