Re: enabling Edit menu items in a modal window?
Re: enabling Edit menu items in a modal window?
- Subject: Re: enabling Edit menu items in a modal window?
- From: Steve Christensen <email@hidden>
- Date: Mon, 02 Mar 2009 10:22:55 -0800
On Mar 2, 2009, at 8:47 AM, Paul Sanders wrote:
nobody even calls validateMenuItem: for my modal window...
Well, you're one step closer to getting to the bottom of it
perhaps, knowing
that.
Is the target of the menu item in question set to the first
responder in IB?
Forgive me if you know all this, but at the code level, this
corresponds to
setting a nil target for the menu item in question. This then
searches the
responder chain, starting with the first responder, for the first
object
than can respond to the selector defined for the menu item's 'sent
action'
in IB, and then sends that object a validateMenuItem message (if
the object
can respond to such a message that is, otherwise it just enables
the menu
item regardless). This is all in the docs.
So it is (probably!) one of:
- the target of the menu item is incorrectly set in IB
- the action of the menu item is incorrectly set in IB
- the control in question does not respond to the action set in IB
- the responder chain is screwed up somehow (unlikely)
Having said all of which, I haven't tried any of this with a table
view,
only an edit field.
A bit of digging around in the debugger should reveal which it is.
IB sets
up items 1 and 2 when you first create your application but maybe
something
has trampled on them. Item 3 can be tested, I would think, by
sending the
table view the appropriate action message yourself in GDB.
I think I mentioned in my original message that I'm writing an
application plugin (for FCP, actually), so I wasn't involved in
setting up the application's nib.
_______________________________________________
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