[mochikit] Re: 'this' and addCallbacks

2007-07-09 Thread Kael Fischer
> > 2. JavaScript doesn't have bound methods. You can't use > > "this.dataReceiver" as a callback. You can use method(this, > > "dataReceiver") though, which will do the right thing. Thanks a lot Bob that works great. -Kael --~--~-~--~~~---~--~~ You received this

[mochikit] Re: 'this' and addCallbacks

2007-07-09 Thread Bob Ippolito
On 7/9/07, Bob Ippolito <[EMAIL PROTECTED]> wrote: > On 7/9/07, kael <[EMAIL PROTECTED]> wrote: > > > > This doesn't work. When the callback, dataReciever, is called it > > doesn't know what 'this' is any more. > > I want dataReciever to update the object and then call > > this.showRecord. > > >

[mochikit] Re: 'this' and addCallbacks

2007-07-09 Thread Bob Ippolito
On 7/9/07, kael <[EMAIL PROTECTED]> wrote: > > This doesn't work. When the callback, dataReciever, is called it > doesn't know what 'this' is any more. > I want dataReciever to update the object and then call > this.showRecord. > > SBP.prototype.dataReceiver = function(data) { > // data is an

[mochikit] 'this' and addCallbacks

2007-07-09 Thread kael
This doesn't work. When the callback, dataReciever, is called it doesn't know what 'this' is any more. I want dataReciever to update the object and then call this.showRecord. SBP.prototype.dataReceiver = function(data) { // data is an array of (id,text) things alert(this.divID + ' dr')

[mochikit] Re: Can't get 'this' to point to the right object

2007-07-09 Thread Arnar Birgisson
Post us an example please.. Arnar On 7/9/07, TiNo <[EMAIL PROTECTED]> wrote: > > Sorry, you told me this before. I have the svn version from a month ago or > so. > Even without using the connectcall (just istantiating in the same .js file) > it goes wrong > > 2007/7/9, Bob Ippolito < [EMAIL PRO

[mochikit] Re: Can't get 'this' to point to the right object

2007-07-09 Thread TiNo
Sorry, you told me this before. I have the svn version from a month ago or so. Even without using the connectcall (just istantiating in the same .js file) it goes wrong 2007/7/9, Bob Ippolito < [EMAIL PROTECTED]>: > > > There's a bug with the interaction between bind and connect. You > either need

[mochikit] Re: Can't get 'this' to point to the right object

2007-07-09 Thread Bob Ippolito
On 7/9/07, TiNo <[EMAIL PROTECTED]> wrote: > Hi, > > I am having another problem with 'this' again. > I have to "classes" (better said, that's how I would like them to behave), > EditGrid and EditCell: > --- > var EditGrid = function (base_url,target_id) { > bi

[mochikit] Can't get 'this' to point to the right object

2007-07-09 Thread TiNo
Hi, I am having another problem with 'this' again. I have to "classes" (better said, that's how I would like them to behave), EditGrid and EditCell: --- var EditGrid = function (base_url,target_id) { bindMethods(this); this.base_url = base_url; this.targ