powered by Jive Software

Can't capture Roster event


I’m having a problem capturing a roster event, for example (from Roster.as):

var availEv:RosterEvent = new RosterEvent(RosterEvent.USER_AVAILABLE);

availEv.jid = aPresence.from.unescaped;

availEv.data = aPresence;


I pass getNewConnection a dictionary which has this event handler:

        callbacks[RosterEvent.USER_AVAILABLE] =

          [this.createFunctionToPassEventToJavascript(Client.ON_ROSTER_EVENT, function(obj:Object):Object {

            var evt:RosterEvent = RosterEvent(obj);

            LOG.debug("Received roster event of type {0}", evt.type);

            var rv:Object = new Object();

            rv.jid = evt.data[0].jid.toString();

            rv.type = evt.type;

            LOG.debug("...returning value of {0}", rv);

            return rv; 


and I see in the debug log that it is getting registered.

However, this handler NEVER gets called, although I trace in the debugger that the first piece of code is executed.

Other event such as MessageEvent.MESSAGE are working fine!

Any ideas why?

Is there anyway to trace events in Flash?