Hi all,
Given the code:
-------------------------------------------
var baz = Class.create({
bar: this.foo,
foo: function() {
alert('I am foo and bar!');
}
});
myObj = new baz();
-------------------------------------------
I would expect that:
myObj.bar();
would pop up the alert, but it turns out that myObj.bar is undefined.
Must I write it like:
bar: function() { this.foo(); }
Any insight would be appreciated.
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.