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:35:00 UTC
[FlexJS] uncaught reference error on known function
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
Re: [FlexJS] uncaught reference error on known function
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
> Please file a bug with a complete but small test case.
Done see https://issues.apache.org/jira/browse/FLEX-35257 <https://issues.apache.org/jira/browse/FLEX-35257>
Thanks,
Justin
Re: [FlexJS] uncaught reference error on known function
Posted by Alex Harui <ah...@adobe.com>.
Please file a bug with a complete but small test case. For FlexJS, the
details matter more than for regular Flex, but FlexJS is also a bit more
verbose when you aren't using the Express components so if you trim stuff
out of the email, we don't have enough info. For example, if "panel" in
"panel.callBack" is Object or "*" then you might get different output than
if it is an actual Class with a property called "callBack" that is of type
Function.
Thanks,
-Alex
On 2/7/17, 12:41 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:
>Hi,
>
>> callBackFunction
>> callbackFunction
>
>Was just a typo in the email I changed the real names to me more generic.
>
>Thanks,
>Justin
Re: [FlexJS] uncaught reference error on known function
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
> callBackFunction
> callbackFunction
Was just a typo in the email I changed the real names to me more generic.
Thanks,
Justin
Re: [FlexJS] uncaught reference error on known function
Posted by Josh Tynjala <jo...@gmail.com>.
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" <ju...@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
Re: [FlexJS] uncaught reference error on known function
Posted by Carlos Rovira <ca...@codeoscopic.com>.
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.