this.constructor.static_variable ? im not sure but it may work :S
-- Fábio Miranda Costa Solucione Sistemas Engenheiro de interface On Fri, Oct 23, 2009 at 1:42 PM, Sam <[email protected]> wrote: > > Hi, > > I am creating classes with Mootools in next way: > > var MyClass = new Class({ > initialize: function() {...}, > > ... > }); > > Now I would like to have static variable that is shared among all > instances of given class. One way to do it is to add another line > after class declaration: > > MyClass.variable = "This is static variable". > > and then variable can be reached from any part of the code with: > MyClass.variable . > > Is it possible to achieve the same effect but having put static > variable inside: > > new Class({ > ... > }); > > ?????
