• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Subclassing NSPopUpButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Subclassing NSPopUpButton
      • From: "Raglan T. Tiger" <email@hidden>
References: 
 >Subclassing NSPopUpButton (From: "Raglan T. Tiger" <email@hidden>)

  • Prev by Date: Re: orderFront: 10.10 vs 10.9
  • Next by Date: Re: Where and how do I know a save completed successfully?
  • Previous by thread: Subclassing NSPopUpButton
  • Next by thread: Re: Subclassing NSPopUpButton
  • Index(es):
    • Date
    • Thread