Here’s the new problem. The server-side Java needs to send a Poll object to the client-side Actionscript. The trouble is, we just cannot get our Poll to play nicely with either plain ol’ Actionscript Objects or with our own PollObject Actionscript class. Here’s how we’re trying to do it; I’m almost certain we’re using Responder wrong, but I can’t be entirely sure:
public function getPoll(pollKey:String):void{
var poll:PollObject;
try
{
nc.call(
"poll.getPoll",
new Responder(
function(result:Object):void {
if(result != null)
{
poll = result as PollObject;
extractPoll(poll);
}
},
function(status:Object):void {
for (var x:Object in status) {
LogUtil.error(x + " : " + status[x]);
}
}
),
pollKey
);
LogUtil.debug(LOGNAME + "nc.call survived");
} catch (e:Error) {
LogUtil.debug(LOGNAME + "nc.call blew up. KABOOM");
}
extractPoll(poll);
}