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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user