Hi Gaetan, > Does anybody know if there is a better way than: > var statics = qx.Class.getByName(this.classname) > > to access the static members/class variables of the "current" (most > specialized) class from one of its parent class? > I think this is the best way to do it. > this.self(arguments) returns me those of the parent class. > This method will return the class, the method was originally defined in. I still think this is a good default behavior. The method should reference always exactly the same static variable, no matter in which context the method gets called. > Shouldn't something like this be the default behavior for > this.self(arguments) (*)? This behavior is quite standard for class > variables in OO languages. > If you want this behavior you can always use member variables. Why should it be possible to override static/class variables in sub classes? Then they would not be truely static. > (*) In practice, and given Qooxdoo current way of doing things, you > can't simply do that, I think. I think you'd have to add a method to > get one "static attribute" back, which would do that and a recursive > lookup in the parent class if the attribute is not found in the > "specialized" class. >
Best Fabian -- Fabian Jakobs JavaScript Framework Developer 1&1 Internet AG Brauerstraße 48 76135 Karlsruhe Amtsgericht Montabaur HRB 6484 Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger, Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Achim Weiss Aufsichtsratsvorsitzender: Michael Scheeren ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
