JavaScript Call Null Return and Adobe Flex-Ajax Bridge

If you are setting a js function callback to a facade flex object, for example: the dataTipFunction property of columnChart must return a value for displaying data tip text. There is a bug in the getRemoteFunctionProxy method in the FABridge.as whereby the return value of a JS function will not get passed to the Flex object.

At the time of writing, there is a bug in the FABridge.as in the getRemoteFunctionProxy method

With the method signature:

public function getRemoteFunctionProxy(functionID:Number,createIfNecessary:Boolean):Function

To fix, just add return to the original line:

ExternalInterface.call("FABridge__invokeJSFunction",serialize(externalArgs));

So you have :

return ExternalInterface.call("FABridge__invokeJSFunction",serialize(externalArgs));

About this entry