RE: script initializtion calls and event binding

2007-01-16 Thread Chris Norris
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 "

Re: script initializtion calls and event binding

2007-01-16 Thread Jesse Kuhnert
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.

script initializtion calls and event binding

2007-01-16 Thread Chris Norris
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