Re: Apple doc says opposite of truth. Doc bug ?
Re: Apple doc says opposite of truth. Doc bug ?
- Subject: Re: Apple doc says opposite of truth. Doc bug ?
- From: Carlos Weber <email@hidden>
- Date: Fri, 14 Dec 2001 19:33:54 -1000
On Friday, December 14, 2001, at 10:48 , Donald Brown wrote:
I read it all as applying to manual menu enabling--when you have manual
menu
enabling enabled for an item, it will always require manual enabling.
So,
if Copy has autoenable turned off, it will remain in whatever state set,
even if an NSTextView has focus and there is something copyable
selected.
Donald
on 12/14/01 2:34 PM, Erik M. Buck at email@hidden wrote:
Here is my opportunity to destroy any expert status I may have
accumulated
;)
The following URL
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/Programmin
gTopics/MenuList/Tasks/EnablingMenuItems.html
Manual Menu Enabling
includes the following text:
"When you use manual menu enabling, you use setEnabled: to enable or
disable
every menu item individually. None of the menu items, even those
controlled
by Application Kit classes like NSTextView, are updated automatically."
I think that should have said exactly the opposite:
None of the menu items, even those controlled by Application Kit
classes
like NSTextView, are updated MANUALLY."
Am I wrong ?
If not, who wants to submit the bug report ?
I read it differently from both of you: for every NSMenu, one can choose
whether or not the items are automatically enabled/disabled by familiar
AppKit mechanisms (searching the responder chain, looking for
-validateMenuItem calls, etc) or not. This is done by calling NSMenu's
-setAutoenablesItems: method with an argument of YES or NO. Since YES is
the default, things usually just work. If, on the other hand, you choose
NO (thereby opting for "manual menu enabling", you are ALWAYS
responsible for enabling and disabling every single item of the affected
menu, even when you would normally expect it to be an item controlled by
other AppKit classes in the ways which we have come to know and love.
Does this make any sense?