7 Oct 17:49
Class instances in statics not supported in 0.8?
From: Gaetan de Menten <gdementen <at> gmail.com>
Subject: Class instances in statics not supported in 0.8?
Newsgroups: gmane.comp.lang.javascript.qooxdoo.devel
Date: 2008-10-07 15:50:31 GMT
Subject: Class instances in statics not supported in 0.8?
Newsgroups: gmane.comp.lang.javascript.qooxdoo.devel
Date: 2008-10-07 15:50:31 GMT
Are class instances in statics not supported in 0.8 anymore?
qx.locale.Manager is undefined DateFormat.js (line 47)
this.__locale = qx.locale.Manager.getInstance().getLocale();
See attached test script (which worked fine in 0.7).
PS: Since I don't know whether this is a bug or simply a pattern which
is not supported anymore, I'm posting here and not in the bugtracker
directly.
--
--
Gaëtan de Menten
http://openhex.org
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ qooxdoo-devel mailing list qooxdoo-devel <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
The
preferred way (without adding manual #requires) would be not to
instantiate the class at load-time, but at run-time. Of course, you
could still assign it to a static variable as you did in your original
code. So, in your app's main() the following would be a working
equivalent:
this.self(arguments).ISO_8601_FORMAT = new
qx.util.format.DateFormat("yyyy-MM-dd");
It is recommended not to run code at load-time that would need to alter
the dependency of classes. To defer such actions to run-time is a
general cure. There'll be some elaborate information about this in the
RSS Feed