• 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: First Responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: First Responder


  • Subject: Re: First Responder
  • From: Conrad Shultz <email@hidden>
  • Date: Thu, 10 May 2012 17:18:51 -0700

On 5/10/12 4:24 PM, koko wrote:
> I have a menu item connected to an action in First Responder;
>
> The action exists in an NSView subclass.
>
> The subclass implements acceptsFirstResonder and return YES.
>
> The subclass implements validateMenuItem and return YES;
>
> When the menu displays the menu item is disabled (set to enabled in IB).
>
> Is this not the proper implementation?

Let's cut to something more basic: is your view ACTUALLY in the
responder chain?

Since you apparently are expecting it to become firstResponder, do you
actually make sure that it does (for example, by sending its window
-makeFirstResponder: or marking it as the window's initialFirstResponder)?

Remember that overriding acceptsFirstResponder does not magically put a
view in the responder chain.  (In addition to -makeFirstResponder: the
view could also of course acquire first responder status in the usual
manner, by user interaction.)


--
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
_______________________________________________

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

References: 
 >First Responder (From: koko <email@hidden>)

  • Prev by Date: Re: First Responder
  • Next by Date: Re: First Responder
  • Previous by thread: Re: First Responder
  • Next by thread: Re: First Responder
  • Index(es):
    • Date
    • Thread