That did it, although I had to add this too -- }).call(this,i);
in order to pass the parameter Thanks Balazs!!! On 18 dic, 12:29, Balazs Endresz <[email protected]> wrote: > Oops, I didn't notice it: you have to pass the `i` variable too: > for ( var i in properties ) { (function(i){ > > That's why you need the closure at all. Without that you will get the > last property from all getters. > > The reference of `this` will always change if you put it in an > additional function, doesn't matter if it's inside an instantiated > object. Well, you can call that either design error or feature too :) > > On Dec 18, 4:18 pm, Pablo Fernandez <[email protected]> > wrote: > > > another thing... why inside the anonymous function 'this' refers to > > 'window' ?? it's totally misleading...

