You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Justin Mclean <ju...@classsoftware.com> on 2017/02/07 07:36:06 UTC

[FlexJS] not a function error when calling callbacks

Hi,

When a callback function is called this runtime error occurs;
Uncaught TypeError: this.callback is not a function

Code looks like this:

<js:initialView>
    <views:SomePanel callback=“{callbackFunction}" />
</js:initialView>

(this.callbackFunction gives the same error BTW)

Inside the panel callback is defined as:

protected var callback:Function;

And called simply like so:
callback();

Thanks,
Justin