Expand my Community achievements bar.

Bug: static listener function doesn't fire in AS when useWeakReference=true

Avatar

Level 1
Note: This is an issue in ActionScript (AS) files only. It
appears to work fine in .mxml files.



For a RemoteObject within an AS file, when a static listener
function is specified in addEventListener and
useWeakReference=true, the listener function is never invoked.



Using the RemoteObject example from
here,
if you make the file an AS file, call it from a .mxml file, change
the getListResultHandler to be static and change



employeeRO.getList.addEventListener("result",
getListResultHandler);



to



employeeRO.getList.addEventListener("result",
getListResultHandler, false, 0,
true);



the getListResultHandler function will never be invoked.
However, if you change useWeakReference=false, e.g.



employeeRO.getList.addEventListener("result",
getListResultHandler, false, 0,
false);



it will be invoked. In a .mxml file, both static and
non-static listener functions get invoked fine.
0 Replies