Hi,
I'm very beginner so please be patient. I'm trying to write an application
that opens a modal login window. This is the class for the login window. (It
is not finished).
qx.Class.define("phpreport_frontend.Login",
{
extend : qx.ui.window.Window,
members :
{
construct : function() {
this.base(arguments, "Bejelentkezés");
},
init : function(app)
{
this.app = app;
this.root = this.app.getRoot();
var bounds = this.root.getBounds();
var layout = new qx.ui.layout.Grid(10,10);
var c = this.__container = new qx.ui.container.Composite();
this.__container.setLayout(layout);
c.add(new qx.ui.basic.Label("User"), {row: 0, column: 0});
c.add(new qx.ui.basic.Label("Password"), {row: 1, column: 0});
this.eLogin = new qx.ui.form.TextField();
this.ePwd = new qx.ui.form.PasswordField();
c.add(this.eLogin, {row: 0, column: 1});
c.add(this.ePwd, {row: 1, column: 0});
this.root.add(this,{left:bounds.width/2, top:bounds.height/2});
this.open();
}
}
});
If I try to create this from my application like:
this.__login = new phpreport_frontend.Login("Login form");
this.__login.init(this);
Then I get this error message:
bounds is null
[Break on this error] this.root.add(this,{left:bounds.width/2,
top:bounds.height/2});
However, if I try do this:
this.root = this.app.getRoot();
alert(this.root);
var bounds = this.root.getBounds();
Then it throws up an alert window with "qx.ui.root.Appliacation[35]" and
then it works!
Why is that? How does an "alert()" call affect any other part of my code?
(Tested on Firefox 3.6.12)
Thanks
Laszlo
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/bounds-is-null-SOMTIMES-tp5780325p5780325.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel