I don't think you can do that. The static is part of the mixin, it's not per whatever it's mixed in to. Maybe you want to create a singleton class to do that?
Derrell On Wed, Dec 23, 2015 at 10:03 AM Dietrich Streifert < dietrich.streif...@googlemail.com> wrote: > Hi Derrell, > > but I want myhash to be specific to the class where the mixin is mixed in. > > So if I mixin to myapp.A and also to myapp.B the myhash static should be > different for each class A and B. > > > Am 23.12.2015 um 15:58 schrieb Derrell Lipman: > > Static members are accessed in exactly the same way regardless of whether > they're in a mixin or not. In this case, you'd access "myapp.MMixin.myhash" > because myhash is a static of the mixin itself. > > Derrell > > > On Wed, Dec 23, 2015 at 9:52 AM Dietrich Streifert < > dietrich.streif...@googlemail.com> wrote: > >> Hi all, >> >> if I have a mixin like this: >> >> qx.Mixin.define("myapp.MMixin", >> { >> statics : { >> myhash: {} >> }, >> >> members: { >> mymethod : function() { >> this.self(arguments).myhash.foo = 'bar'; // this does not work !!!! >> >> this.constructor.myhash.foo = 'bar'; // this does not work !!!! >> } >> } >> }); >> >> How do I access the static member myhash? The code above does not work! >> >> The mixin is of course used via include in another class. >> >> Any help would be great! >> >> Regards >> Dietrich >> > > > ------------------------------------------------------------------------------ > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >
------------------------------------------------------------------------------
_______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel