Just tested on Testbed because I was curious:
PHP Code:
//#CLIENTSIDE
function onCreated() {
// This doesn't work
temp.gui = new GuiWindowCtrl();
temp.gui.width = temp.gui.height = 256;
temp.gui.text = "Test!";
// but it works if you uncomment this line:
//GraalControl.addControl(temp.gui);
}
edit: I thought maybe it didn't work because the GuiControl was just destroyed as soon as the reference to temp.gui was lost (i.e. when onCreated() returns), but it didn't work if I maintained a reference either (such as with this.gui instead of temp.gui).