on in the
prototype that the "this" would be referring to the correct thing.
-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 16, 2007 4:42 PM
To: Tapestry users
Subject: Re: script initializtion calls and event binding
The context of "
The context of "this" is probably what is breaking. That particular
keyword is deceptively similar to java this but much more specific.
in a block like :
dojo.addOnLoad(function(){
});
"this" refers to the closest containing object. In this case that
would be the anonymous function(){} object.
Please bear with me though this explanation. We have some code that is
broken, I believe, by the inclusion of all script initialization code in
a dojo.addOnLoad call.
The code this is being broken is a call to Scriptaculous' Event.observe:
Event.observe(this.picture, "load",
this.onLoad.bindAsEve