Akari no ryu
2008-10-02 05:41:37 UTC
I've been battling with this for a few hours now, been reading the
docs and read this groups mails on defferred.callback
None of that seems to help.
My code does the following:
this.interfaceTypes = {
'lines':false,
'regions':false,
'points':false
};
for(var i in this.interfaceTypes)
{
var url = i+'.php';
var queryString = MochiKit.Base.queryString({'do':'fetchTypes'});
log('created url of '+url+' and queryString of '+queryString);
try
{
var request = MochiKit.Async.doXHR(url);
request.addCallBacks(
partial(this.typeLoaded, i),
partial(this.typeFailed, i)
);
}
catch(e)
{
for(var j in request)
{
log('request.'+j+"\n"+request.j)
}
}
}
For all values of request's properties, it's showing up as undefined.
Also, if I don't litter my constructor with log calls, the log calls
don't happen in there and a log call after it won't happen either.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
docs and read this groups mails on defferred.callback
None of that seems to help.
My code does the following:
this.interfaceTypes = {
'lines':false,
'regions':false,
'points':false
};
for(var i in this.interfaceTypes)
{
var url = i+'.php';
var queryString = MochiKit.Base.queryString({'do':'fetchTypes'});
log('created url of '+url+' and queryString of '+queryString);
try
{
var request = MochiKit.Async.doXHR(url);
request.addCallBacks(
partial(this.typeLoaded, i),
partial(this.typeFailed, i)
);
}
catch(e)
{
for(var j in request)
{
log('request.'+j+"\n"+request.j)
}
}
}
For all values of request's properties, it's showing up as undefined.
Also, if I don't litter my constructor with log calls, the log calls
don't happen in there and a log call after it won't happen either.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---