B
Brett Foster
Perhpas somebody can give me a hand with this little problem.
Given:
var object; -- an object
var func; -- a function call back
Now, I want to know how to get the following effect:
object.func = func;
object.func();
function func (somethingelse) {
this.something = somethingelse;
}
such that 'this' referes to 'object' without having to make 'func' a
member of 'object'. I tried `with (object) {func ();}` which I realized
wouldn't do that job.
Thanks,
Brett Foster
Given:
var object; -- an object
var func; -- a function call back
Now, I want to know how to get the following effect:
object.func = func;
object.func();
function func (somethingelse) {
this.something = somethingelse;
}
such that 'this' referes to 'object' without having to make 'func' a
member of 'object'. I tried `with (object) {func ();}` which I realized
wouldn't do that job.
Thanks,
Brett Foster