Re: Open Recent Menu Item
Re: Open Recent Menu Item
- Subject: Re: Open Recent Menu Item
- From: Lorenzo <email@hidden>
- Date: Thu, 15 Jul 2004 11:18:30 +0200
Hi,
now it works almost well. Using the "validateMenuItem" I can enable/disable
all the menu items, except for the menu items "About", "Preferences" and
"Quit" located in the Application Menu.
These menu items are connected (Target/Action) to my class methods, but they
never invoke the validateMenuItem method. Why? Is it because they are
located in the Application Menu? How can I enable/disble these menu items
too?
Thank you.
Best Regards
--
Lorenzo
email: email@hidden
>
From: j o a r <email@hidden>
>
Date: Wed, 14 Jul 2004 13:15:55 +0200
>
To: Lorenzo <email@hidden>
>
Cc: Stiphane Sudre <email@hidden>
>
Subject: Re: Open Recent Menu Item
>
>
The "validateMenuItem:" method is only called when you are the
>
receiver of the action from the menu item. Are you?
>
>
j o a r
>
>
On 2004-07-14, at 13.16, Lorenzo wrote:
>
>
> I did what you said. It works. But I get I problem. I cannot disable
>
> the
>
> "Open Recent" menu item when I need. I have assigned to the "Open
>
> Recent"
>
> menu item the tag 12, but I cannot see any call from that menu in the
>
> validateMenuItem method. When I define the following
>
>
>
> - (BOOL)validateMenuItem:(NSMenuItem*)theItem
>
> {
>
> NSLog(@"validateMenuItem \"%@\" (tag: %d)", [theItem title],
>
> tag);
>
> }
>
>
>
>
>
> The item "Open Recent" never invokes the method "validateMenuItem". I
>
> never
>
> see its item name in the log text. I need to disable this menu item in
>
> some
>
> personal cases. How can I do?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.