I'm using prototype 1.6 in my project, Just so you know.
so i have this JS class that looks like this:
var Spiral = Class.create({
data:null,
initialize: function()
{
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("VIEWER"), 'viewer');
req.send(this._handleData.bindAsEventListener(this));
},
_handleData: function(data)
{
this.data = data;
},
})
then I instance it:
var spiral = new Spiral();
well I'm having problems with the fact that the DataRequest is
asynchronous, I need to know when the DataRequest is done so i can
continue to do what I plan on doing with the data.
After the line that instances the Spiral class runs, the DataRequest
is still going, if I try to operate on the data after I instance my
class I will most defiantly receive an error.
How can I either make it synchronous, or check that the DataRequest is
finished?
Any help is appreciated
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenSocial API Definition" 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/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---