I would have to use *2* names per attribute "x" and "x_". That's
crazy. I would have to use an library which does make this job for me.
I can't write an model with
Object.defineProperty(
model, 'x',
{ 'set': function (newx) { model.x_ = x; object1.signal("x");
object2.signal("x"); object3.signal("x") },
'get': function() { return model.x_ }, writable: true })
2009/12/27 Mike Samuel <[email protected]>:
> ES5 Setters let you do this.
>
> Object.defineProperty(
> model, 'x',
> { 'set': function (newx) { model.x_ = x; },
> 'get': function() { return model.x_ }, writable: true })
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss