Open GoogleCodeExporter opened 9 years ago
with persistense:
if(val && 'object'==type && !props.persistent){
if('[object Array]'==Object.prototype.toString.call(val))
val=Array.prototype.slice.call(val);
else{
var initial=val;
Joose.O.extend(val={}, initial);
}
}
Original comment by denis.gu...@gmail.com
on 20 Oct 2009 at 8:55
If you need to initialize a property with an object (or array) you are supposed
to
provide an initialization function:
has : {
prop : {
init : function () { return {} }
}
}
Otherwise such property will be shared among all instances (including
subclass'es
ones), as you reported.
Please report if this solves this issue.
Original comment by nickol...@gmail.com
on 20 Oct 2009 at 9:18
I try to use this, but my property is private:
_e: {init: {}}
and I didn't use getters/setters in my base component
Original comment by denis.gu...@gmail.com
on 20 Oct 2009 at 9:22
This function will be used for property initialization only, getters/setters are
different things.
Original comment by nickol...@gmail.com
on 20 Oct 2009 at 9:31
Try _e: {init: function () { return {} }}
Original comment by malte.ubl
on 20 Oct 2009 at 9:36
Original issue reported on code.google.com by
denis.gu...@gmail.com
on 20 Oct 2009 at 8:52