• 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: Enabling menu items...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enabling menu items...


  • Subject: Re: Enabling menu items...
  • From: Jim Majure <email@hidden>
  • Date: Thu, 17 Dec 2009 14:20:27 -0600

I tried your suggestion of changing the action to "myDelete:", but it still doesn't work. Something else responding to the action first seems like a possible problem.
I added "myDelete:" to the First Responder in IB, then tied the "Delete" menu item to it using click-drag. I changed the name of the action in my custom view to "(IBAction) myDelete: (id) sender".


At the time I attempt to invoke the menu item, my view has received the "becomeFirstResponder" but has not yet received the "resignFirstResponder", so I THINK i'm the firstResponder.

On Dec 17, 2009, at 12:27 PM, Quincey Morris wrote:



So, one of two things happened:

1. Your view really isn't first responder, and another responder is handling 'delete:'.

2. Something is modifying the target/action configuration of the menu item so that 'delete:' is being sent to a different responder, not First Responder.

It's also possible that your view is a subview of something that implements a check for 'delete:' in 'validateMenuItem:' instead of 'validateUserInterfaceItem:', and that's sucking up the action.

You could try (temporarily) renaming your action to 'myDelete:' or something and see if that works. If so, the responder chain is fine, and your problem is just that something else is getting in first.




_______________________________________________

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: Enabling menu items...
      • From: Quincey Morris <email@hidden>
References: 
 >Enabling menu items... (From: Jim Majure <email@hidden>)
 >Re: Enabling menu items... (From: Quincey Morris <email@hidden>)
 >Re: Enabling menu items... (From: Jim Majure <email@hidden>)
 >Re: Enabling menu items... (From: Quincey Morris <email@hidden>)

  • Prev by Date: understanding the column of a double clicking into a table view
  • Next by Date: Re: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings
  • Previous by thread: Re: Enabling menu items...
  • Next by thread: Re: Enabling menu items...
  • Index(es):
    • Date
    • Thread