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: "Paul Sanders" <email@hidden>
- Date: Mon, 2 Mar 2009 16:47:23 -0000
> 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.
HTH - Paul Sanders.
_______________________________________________
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