[Pharo-project] isActive and isEnable
Dear OBers, What is the difference between these two methods? Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
#isActive would probably better be called #isVisible. Lukas On Thu, Feb 12, 2009 at 1:28 PM, Alexandre Bergel <Alexandre.Bergel@inria.fr> wrote:
Dear OBers,
What is the difference between these two methods?
Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli http://www.lukas-renggli.ch
#isActive would probably better be called #isVisible.
yeah, that's true. So #isActive in the context of a command tells you whether this command is present for the given entity and #isEnabled whether it's also selectable. For an example see 'redo' of OB-Refactory. If there is no redo-action available, the command is still visible in the menu but not selectable. David
Maybe some comments could be added in the class OBCommand Shall I do it? But I cannot say more than what you just said Cheers, Alexandre On 12 Feb 2009, at 14:49, David Röthlisberger wrote:
#isActive would probably better be called #isVisible.
yeah, that's true.
So #isActive in the context of a command tells you whether this command is present for the given entity and #isEnabled whether it's also selectable. For an example see 'redo' of OB-Refactory. If there is no redo- action available, the command is still visible in the menu but not selectable.
David
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
participants (4)
-
Alexandre Bergel -
Alexandre Bergel -
David Röthlisberger -
Lukas Renggli