Hey,

first of all, you static variable is written with 3 t's which could be one of 
the problems. Additionally, you always have to access the statics fully 
qualified which means:

Application.js:
myapp.Application.mapSettings = new myapp.mapSetting();

This way, your code in your second class should work. 
Using it the way you did in ends up with a global mapSetting variable because 
you omitted the var statement. So be careful with that.
I hope that helps. :)

Regards,
Martin

Am 20.09.2010 um 13:20 schrieb Ratibor Redoran:

> 
> Static attributes of classes are modifiable. ("static" actually means
> "class variable").
> 
> Yes, but if I need to create object after program starting (in "static" part
> it is null) that I cannnot use it in the other classes directly. As example:
> 
> //--------------------------------------------------------------------------------------------------
> (Application.js)
> 
>  "statics" : {
>      mapSettting : null
>  }, 
> 
>  main : function()
>    {
>      this.base(arguments);
> 
>      mapSetting = new myapp.mapSetting(); // mapSetting class isn't given
> here
> 
>      var myVariable = myapp.subclass();
> 
>    }
> 
> //--------------------------------------------------------------------------------------------------
> (subclass.js)
> 
> qx.Class.define("myapp.subclass",
> {
>  extend : qx.core.Object,
> 
>  construct: function()
>  {
>    this.base(arguments);
> 
>    var mapSetting  = myapp.Application.mapSetting; // Here "mapSetting" is
> null still :(
>  }
> });
> 
> What can we suggest in this situation? Well, I can create subclass property
> and write "mapSetting" link in it... but it isn't the good way for me.
> -- 
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/External-variable-and-class-instance-tp5537841p5549970.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to