Re: Enabling menu items?
Re: Enabling menu items?
- Subject: Re: Enabling menu items?
- From: Kai-Mikael Jää-Aro <email@hidden>
- Date: Thu, 26 Jul 2007 11:16:16 +0200
Antonio Nunes kirjoitti 2007-07-25 kello 19:40:
On 25 Jul 2007, at 13:01, Kai-Mikael Jää-Aro wrote:
Makes no difference.
Also, the Application Menu and Pop-up List Programming Topics for
Cocoa manual says: "In general, you should use
validateUserInterfaceItem: instead of validateMenuItem: since the
former will also work for toolbar items which have the same target
and action." so shouldn't I use the former?
Yep, you're fine using the former. My mistake. Apologies. I think,
after having a closer look your problem lies with the view not
becoming first responder. I don't know why the binding doesn't
work, but if you make your view first responder in code when the
nib has finished loading, that should get things going.
I dug about some more. Apparently, in spite of me having set the
window's initialFirstResponder to the EditorView, the window remains
first responder, even if I click in the EditorView. This seems to be
in direct contradiction of what should be happening according to the
Cocoa Event-Handling Guide. I put a
[[self window] makeFirstResponder: self];
in the -mouseDown method of EditorView and then the view does become
first responder.
Anyone have an idea why this is not happening automatically?
_______________________________________________
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