I still don't see why there's no 'with' statement in GS3. It helps clean up code and is very useful in GUI Building and other object work.
I.e. How I've used it in GS2:
PHP Code:
temp.window = addWindow("Example");
with (temp.window) {
this.title = "Example Window";
with (addButton(this, "Button")) {
}
with (addButton(this, "Button2")) {
}
}
function addWindow(obj_id) {
temp.window = new GuiWindowCtrl(obj_id);
return temp.window;
}
function addButton(parent, obj_id) {
temp.button = new GuiButtonCtrl(obj_id);
parent.addcontrol(temp.button);
return temp.button;
}
Quote:
Originally Posted by devilsknite1
but I would really like to see thorough documentation on this if other languages like Lua will not be used.
|
Even if he implemented Lua that isn't going to change the fact he still needs to document how the language works with and manipulates the Graal engine. A lot of GS2's current function usage isn't going to change that much in GS3 by the looks of it.