I think you should define your property in a
properties: {}
section:
http://manual.qooxdoo.org/1.6.x/pages/core/understanding_properties.html
Cheers,
Fritz
On Sun, 12 Feb 2012, Thomas Schober wrote:
Hi,
i implemented the following application class :
qx.Class.define("snowscale.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)
*/
statics :
{
mainDesktop : {check:"qx.ui.window.Desktop"}
},
main : function()
{
// Call super class
this.base(arguments);
// 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...
-------------------------------------------------------------------------
*/
//Setup Desktop
var tabView = new qx.ui.tabview.TabView();
this.getRoot().add(tabView, {edge: 0});
var page = new qx.ui.tabview.Page("Main Page",
"icon/32/actions/go-home.png");
page.setLayout(new qx.ui.layout.Grow());
tabView.add(page);
var windowManager = new qx.ui.window.Manager();
var desktop = new qx.ui.window.Desktop(windowManager);
desktop.set({decorator: "main", backgroundColor: "background-pane"});
this.mainDesktop = desktop;
page.add(desktop);
//MenĂ¼ anzeigen
toolbar = new qx.ui.toolbar.ToolBar();
toolbar.setSpacing(5);
desktop.add(toolbar);
var part1 = new qx.ui.toolbar.Part();
var loginButton = new qx.ui.toolbar.Button("Login",
"icon/22/actions/document-new.png");
part1.add(loginButton);
part1.add(new qx.ui.toolbar.Separator());
toolbar.add(part1);
loginButton.addListener("execute", this.logMeIn);
},
//loginfunction
logMeIn : function()
{
/* Container layout */
var win = new qx.ui.window.Window("Window").set({
width: 400,
height: 300,
showClose : false,
showMinimize : false
});
this.mainDesktop.add(win);
}
}
});
I defined the property
statics :
{
mainDesktop : {check:"qx.ui.window.Desktop"}
},
and tried to access it in the listener logMeIn here : this.mainDesktop.add(win);
But i everytime get the error TypeError: 'undefined' is not an object
(evaluating 'this.mainDesktop.add').
Why i am not able to access the property here in this function ? It looks like
its not recognized as defined. Am I doing anything wrong in the definition of
the property ?
Best Regards
Tom
--
Oetiker+Partner AG tel: +41 62 775 9903 (direct)
Fritz Zaucker +41 62 775 9900 (switch board)
Aarweg 15 +41 79 675 0630 (mobile)
CH-4600 Olten fax: +41 62 775 9905
Schweiz web: www.oetiker.ch
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel