Menu validation problem with Font Manager menu items
Menu validation problem with Font Manager menu items
- Subject: Menu validation problem with Font Manager menu items
- From: Graham Cox <email@hidden>
- Date: Thu, 17 Apr 2008 17:22:03 +1000
My app can respond to changeFont: and friends in various places. When
those places have focus, the text menu items such as Bold, Italic and
so on are enabled, and when they are not focused, they are disabled.
All great.
However, there are some places in my app that selectively respond to
changeFont: - in some states they respond, in others they don't. I'd
like to be able to disable the Text menu items when they are in the
state that won't respond, naturally enough. The problem is that these
menu items are not passed through my validateMenuItem: method -
instead they seem to be directly targeting the Font Manager which is
doing some behind-the-scenes magic of its own - probably just checking
that the responder chain can respondToSelector(changeFont:)
In fact items such as Bold have the action addFontTrait: targeted on
the Font Manager, so it seems there's more magic going on - this item
is apparently validated based on whether 1stR has changeFont: But
anyway, even trying to trap addFontTrait: in validateMenuItem is not
working, because the item targets FM directly, not 1stR.
Is there a way to get an opportunity to validate these menu items?
------
S.O.S.
_______________________________________________
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