Made my CommandButton factory method the constructor.

I had initially been hesitant to do this because of the parameter that
can be one of two things, and the Java side of me wanted to hold
on to compile-time checking, but the convenience is too damn convenient.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@408 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Ray Greenwell
2008-02-06 01:03:55 +00:00
parent 1fb449b30b
commit a6e1fbe468
3 changed files with 29 additions and 30 deletions
+1 -3
View File
@@ -59,9 +59,7 @@ public class ChatControl extends HBox
addChild(_txt = new ChatInput());
_txt.addEventListener(FlexEvent.ENTER, sendChat, false, 0, true);
_but = new CommandButton();
_but.label = sendButtonLabel;
_but.setCallback(sendChat);
_but = new CommandButton(sendButtonLabel, sendChat);
addChild(_but);
if (!isNaN(height)) {