From 2c60e6c3cfa8b0b3539f7619d99fdd819d3e0828 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Fri, 9 Jan 2009 00:31:01 +0000 Subject: [PATCH] Use the 'enabled' property setter/getter. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@748 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/as/com/threerings/flex/ChatControl.as | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/as/com/threerings/flex/ChatControl.as b/src/as/com/threerings/flex/ChatControl.as index e5efc7ad..d2aa551d 100644 --- a/src/as/com/threerings/flex/ChatControl.as +++ b/src/as/com/threerings/flex/ChatControl.as @@ -89,6 +89,20 @@ public class ChatControl extends HBox return _but; } + override public function set enabled (en :Boolean) :void + { + // don't call super (and the only time these aren't around is during construction) + if (_txt != null) { + _txt.enabled = en; + _but.enabled = en; + } + } + + override public function get enabled () :Boolean + { + return _txt.enabled; + } + /** * Request focus to this chat control. */ @@ -97,15 +111,6 @@ public class ChatControl extends HBox _txt.setFocus(); } - /** - * Enables or disables our chat input. - */ - public function setEnabled (enabled :Boolean) :void - { - _txt.enabled = enabled; - _but.enabled = enabled; - } - /** * Configures the chat director to which we should send our chat. Pass null to restore our * default chat director.