So, I played with code around, and discovered that comma after the second function should've been removed, and tree declaration may be done in the function, not outside of it. Thanks for your time. Resulting working code:
/**
* This is the main application class of your custom application "sphinx2"
*
* @asset(sphinx2/*)
*/
qx.Class.define("sphinx2.Application",
{
extend : qx.application.Standalone,
/*
*****************************************************************************
MEMBERS
*****************************************************************************
*/
members :
{
/**
* This method contains the initial application code and gets called
* during startup of the application
*
* @lint ignoreDeprecated(alert)
*/
main : function()
{
// Call super class
this.base(arguments);
this.addSplitPaneTwoFlexSimple();
// Enable logging in debug variant
if (qx.core.Environment.get("qx.debug"))
{
// support native logging capabilities, e.g. Firebug for Firefox
qx.log.appender.Native;
// support additional cross-browser console. Press F7 to toggle visibility
qx.log.appender.Console;
}
},
/*
-------------------------------------------------------------------------
Below is your actual application code...
-------------------------------------------------------------------------
*/
addSplitPaneTwoFlexSimple : function()
{
var splitpane = new qx.ui.splitpane.Pane("horizontal");
splitpane.setWidth(400);
splitpane.setHeight(60);
splitpane.setDecorator("main");
this.getRoot().add(splitpane, {left:20, top:20});
// Left
var tree = this.getTree();
splitpane.add(tree, 1);
// Right
var rightWidget = new qx.ui.form.TextArea("Flex:2");
rightWidget.setDecorator(null);
rightWidget.setWrap(true);
splitpane.add(rightWidget, 2);
},
getTree : function()
{
var tree = new qx.ui.tree.Tree().set({
draggable: true
});
var root = new qx.ui.tree.TreeFolder("root");
root.setOpen(true);
tree.setRoot(root);
var te1 = new qx.ui.tree.TreeFolder("Desktop");
te1.setOpen(true);
te1.setIcon("icon/22/places/user-desktop.png");
root.add(te1);
var te1_1 = new qx.ui.tree.TreeFolder("Files");
var te1_2 = new qx.ui.tree.TreeFolder("Workspace");
var te1_3 = new qx.ui.tree.TreeFolder("Network");
var te1_4 = new qx.ui.tree.TreeFolder("Trash");
te1.add(te1_1, te1_2, te1_3, te1_4);
var te1_2_1 = new qx.ui.tree.TreeFile("Windows (C:)");
var te1_2_2 = new qx.ui.tree.TreeFile("Documents (D:)");
te1_2.add(te1_2_1, te1_2_2);
var te2 = new qx.ui.tree.TreeFolder("Inbox");
var te2_1 = new qx.ui.tree.TreeFolder("Presets");
var te2_2 = new qx.ui.tree.TreeFolder("Sent");
var te2_3 = new qx.ui.tree.TreeFolder("Trash");
for (var i=0; i<30; i++) {
te2_3.add(new qx.ui.tree.TreeFile("Junk #" + i));
}
var te2_4 = new qx.ui.tree.TreeFolder("Data");
var te2_5 = new qx.ui.tree.TreeFolder("Edit");
te2.add(te2_1, te2_2, te2_3, te2_4, te2_5);
root.add(te2);
return tree;
}
}
});