First of all big thanks to Dan, because you opened my mind for singletons, and
to Thomas Schober, your Window Class is much better than mine.
But when i am trying to define type: "singleton" and use getInstance() to get
it, i am getting this error :
this is not a constructor
this.$$instance = new this;
on Class.js (Line 667)
my code lookd like this:
openSale : function()
{
this.appSale = new radial.Sale.getInstance();
this.appSale.open();
this.appSale.addListener("close", function(e)
{
this.appSale = null;
},this);
this.cmpDesktop.add(this.appSale);
}
------sale.js----------
qx.Class.define("radial.Sale",
{
type: "singleton",
extend : qx.ui.window.Window,
construct : function()
{
this.base(arguments);
this.set
({
modal : false,
showMinimize : false,
showMaximize : true,
allowMaximize : true,
allowClose : true
});
this.setLayout(new qx.ui.layout.VBox(10));
this.setShowStatusbar(false);
this.addContent();
},
members :
{
addContent : function()
{
var windowLayout = new qx.ui.layout.VBox(10);
this.setLayout(windowLayout);
this.setMinWidth(300);
var loginField = new qx.ui.form.TextField("Enter Login").set({width: 260});
var passField = new qx.ui.form.PasswordField("Enter Passw").set({width :
260});
this.add(loginField);
this.add(passField);
this.center();
}
}
});
regards Mustafa
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel