Thanks Hugh.
I was not aware of this. I defined all my constants as properties and used
getXXX().
Time to replace my code.
Thanks.
Kanugula.
Hugh Gibson wrote:
>
>> How do you think I can best define my constants?
>
> Use the "statics" keyword in a class definition.
>
> We also define class objects just for constants, like this one:
>
> qx.Class.define("abling.constants.CConference",
> {
> /*
> ********************************************************************
> STATICS
> ********************************************************************
> */
>
> statics :
> {
> //
> // This set define whether a conference is public, private or
> // personal in the UI.
> //
> ePublicConference : 0, // public conference
> ePrivateConference : 1, // private conference
> ePersonalFolder : 2 // personal folder
> }
> });
>
> Then we refer to them in the code with
> abling.constants.CConference.ePublicConference for example.
>
> Hugh
>
> -------------------------------------------------------------------------
> 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
>
>
--
View this message in context:
http://www.nabble.com/best-way-to-define-constants-within-qooxdoo-tp18845032p18853135.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
-------------------------------------------------------------------------
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