Hi everybody,
I'm new in qooxdoo,
I generated a sample app and started playing with Application.js
I created a window and want to add a button to it, when I add it
win.add(...) nothing is show.
When I comment the win.add(Button2, ...) evry thing goes fine.
Please let me know what's wrong in this code:
/* ************************************************************************
Copyright:
License:
Authors:
************************************************************************ */
/* ************************************************************************
#asset(elaweb/*)
************************************************************************ */
/**
* This is the main application class of your custom application "elaweb"
*/
qx.Class.define("elaweb.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);
// Enable logging in debug variant
if (qx.core.Variant.isSet("qx.debug", "on"))
{
// 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...
-------------------------------------------------------------------------
*/
// Create a button
var button1 = new qx.ui.form.Button("First Button",
"elaweb/test.png");
// Document is the application root
var doc = this.getRoot();
// Add button to document at fixed coordinates
doc.add(button1, {left: 100, top: 50});
// Add an event listener
button1.addListener("execute", function(e) {
// button1.hide();
alert("Hello World!");
});
this.cw();
} ,
cw : function()
{
var win = new qx.ui.window.Window("First Window");
win.setWidth(300);
win.setHeight(200);
win.setShowMinimize(false);
win.setAllowMaximize(false);
win.open();
this.getRoot().add(win, {left:200, top:200});
var button2 = new qx.ui.form.Button("My Button", "elaweb/test.png");
// Add an event listener
button2.addListener("execute", function(e) {
alert("Hello World in First window's button 2!");
});
win.add(button2, {left: 100, top: 100}); //if I comment this line,
it's ok.
}
}
});
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/beginner-s-question-tp5758657p5758657.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel