Hi Gaetan!
> > Great. As a quick workaround, to get your code going, you could add the
> > following compiler hints to your Application.js:
> >
> > /*
> > #require(qx.locale.Manager)
> > #require(qx.locale.Date)
> > */
> >
> > This is of course awful, since you are fixing missing dependencies for
> > the DateFormat class, but this is how you can treat it in your own code.
> > The generator should do this correctly, but it is not so obvious how to
> > achieve this.
>
> Thanks. Works fine and this is already nicer than my own workaround:
> recreating the instance everywhere/time I use the date format.
Sure, there are better solutions than to recreate the instance. ;-) 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
manual shortly, so I won't go into details now. qooxdoo 0.7 tried to fix
such scenarios automatically, but as this has its own fundamental
limitations, it was left out of 0.8. We'll track in bugzilla what is
realistic to mitigate those cases.
Bye,
Andreas
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel