Hi thank you all @Ryan and Arieh. > Singletons > > There's Christoph's Class.Singleton, I've never used it though: > > http://github.com/cpojer/mootools-class-extras
If you think that I should use a singleton, then I'm going to use some natural js methods that are described here: http://keetology.com/blog/2009/07/23/up-the-moo-herd-iii-its-classy-not-classic In particular, I really like this one, using a closure: (function(){ // variable for holding the instance.. var instance = null; this.Singleton = new Class({ initialize: function(name){ if (instance) return instance; instance = this; } }); })(); Bye! :)
