I don't know if this is simply a typo in the email or not, but I see two
different capitalizations of the B.

callBackFunction
callbackFunction

- Josh


On Feb 6, 2017 11:35 PM, "Justin Mclean" <jus...@classsoftware.com> wrote:

Hi,

This code:

public function initialise():void {
    panel.callback = callbackFunction;
}

public function callBackFunction():void {
    //TODO code goes here
}

Gives this error when the initialise function is called:

Uncaught ReferenceError: callbackFunction is not defined

Changing it to this (pun intended) makes it work. Why is “this" needed?

public function initialise():void {
    panel.callback = this.callbackFunction;
}

Thanks,
Justin

Reply via email to