manager = function(object) {
this.init.apply(this, arguments);
}
manager.prototype = new function() {
/* Private Properties */
var gui;
var obj;
/* Constructor */
this.init = function(object) {
gui = new Gui();
obj = object;
}
/* Property with both accessor and mutator */
this.__defineGetter__("modus", function() {
[..]
});
this.__defineSetter__("modus", function(modus) {
[..]
});
/* Privileged public method which affords access to private properties */
this.getGui = function() {
return gui;
}
}
Currently I'm able to set accessor and mutator for properties of "this", but not
on the lexical scope chain. I want e.g. "modus" to be private.
Anyway I hope you get what I mean. It's an
evolutionary step to class support. Other programming languages
support
private int foo {
get { [..] }
set { [..] }
}
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss