[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Revert menu-item not enable
- To: andre_koehorst@riks.nl
- Subject: Re: Revert menu-item not enable
- From: "Mark A. Tapia" <markt@dgp.toronto.edu>
- Date: Mon, 2 Aug 1993 12:18:22 -0400
- Cc: info-mcl@cambridge.apple.com
On Mon Aug 2, Andre Koehorst writes:
REGARDING Revert menu-item not enabled
If we define a window-revert method for a window class, the
standard menu item "Revert" will not be enabled (when an instances
is made active) if we've also defined a window-needs-saving-p
method for that class.
...
Test machines: FX, 16-32 meg sys 7.1. (more info when necessary)
Is this a bug?
... code omitted
I've tried your example under Common Lisp Version 2.0p2
and have been unable to duplicate the problem.
1. the Save menu item of the *file-menu* is enabled for both windows.
2. The Revert menu item of the *file-menu* is enabled for the window
(test2) with the window-revert method and disabled for
the window without a window-revert method.
Perhaps you're running a different version or you've changed
the behavior of the *file-menu* or the Revert menu item.
mark
The standard ccl::update-function for the *file-menu* is nil.
The standard ccl::update-function for the revert menu item is the
CCL::REVERT-MENU-ITEM-UPDATE function
The function executes the following steps.
1. If there is a front window continue
otherwise disable the revert item and return
2. If a window-revert method exists for the front window continue,
otherwise disable the revert item and return
3. If a window-needs-saving-p method exists for the front window continue,
otherwise disable the revert item
4. When a window-filename exists for the front window, then execute it.
5. Invoke the window-needs-saving-p method.
If it returns t, then enable the revert menu item
otherwise disable the revert menu item.