Re: Enabling menu items...
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