Dojo Singleton or at least static method/variable?

does anyone know how to make a Dojo Class a singleton, or at least how to create a static method or variable in a dojo class?

I currently achieve this by having a global Variable for each class and a method that sets this variable if its null, but this is a crappy solution. Having a singleton class would be much nicer because one could inherit from it and voilá has a singleton :)

heinrich

5
задан Erik 2 December 2010 в 11:27
поделиться