[qooxdoo-bugs] [Bug 4040] Cannot use static vars to define another static var in the same class
Brought to you by:
ecker,
martinwittemann
From: <bug...@qo...> - 2010-08-30 14:09:39
|
http://bugzilla.qooxdoo.org/show_bug.cgi?id=4040 Martin Wittemann <mar...@1u...> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #1 from Martin Wittemann <mar...@1u...> --- This is by design and can not be changed. The code [bugs.ui.Example.YES, bugs.ui.Example.NO] is executed on load time before qx.Class.define is executed which means, before the class itself even exists. Every class can have a defer block which is exactly for such tasks: qx.Class.define("bugs.ui.Example", { type: "static", statics: { YES: new qx.ui.form.Button("Yes"), NO: new qx.ui.form.Button("No"), // this does not work: bugs.ui is undefined YESNO: null }, defer : function(statics) { statics.YESNO = [statics.YES, statics.NO] } }); -- Configure bugmail: http://bugzilla.qooxdoo.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. |