You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Carlos Rovira <ca...@codeoscopic.com> on 2017/02/07 10:20:35 UTC

Re: [FlexJS] uncaught reference error on known function

For me that is a bug. And should be filled in JIRA.
Could wait for others opinion to see is something more implicated.

2017-02-07 8:35 GMT+01:00 Justin Mclean <ju...@classsoftware.com>:

> 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




-- 

Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es

Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.

De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.