New method to allow a command button to be activated, emulating a user click

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@676 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Jamie Doornbos
2008-10-27 22:13:45 +00:00
parent 8d4c46f3c3
commit c420e540d6
@@ -69,6 +69,14 @@ public class CommandButton extends Button
_arg = arg;
}
/**
* Emulate a user click, dispatching all relevant events.
*/
public function activate () :void
{
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
override public function set enabled (val :Boolean) :void
{
super.enabled = val;