haxe -as3 producing ActionScript with _label instead of label

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

haxe -as3 producing ActionScript with _label instead of label

Jake Lewis
Upon converting to the latest haXe, and converting to actionscript via the -as3 parameter, the resultant .as code has a sprinkling of the variable "label" being converted to "_label" in certain, but not all cases.

This causes a compile error in one case, and a runtime error in another.  Upon changing the variables name to 'plabel' the problem resolved.

I'm hoping this bug is restricted to the 'label' name, as I can easily search the resultant .as codebase for _label, but if it occurs for other words then I'm just going to have to find them at runtime :(

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe -as3 producing ActionScript with _label instead of label

Nicolas Cannasse
Jake Lewis a écrit :

> Upon converting to the latest haXe, and converting to actionscript via
> the -as3 parameter, the resultant .as code has a sprinkling of the
> variable "label" being converted to "_label" in certain, but not all cases.
>
> This causes a compile error in one case, and a runtime error in
> another.  Upon changing the variables name to 'plabel' the problem resolved.
>
> I'm hoping this bug is restricted to the 'label' name, as I can easily
> search the resultant .as codebase for _label, but if it occurs for other
> words then I'm just going to have to find them at runtime :(

"label" is listed as an AS3 keyword, so should be always replaced with
"_label" in the generated code in all cases.

Could you try to reproduce a very small example in which "label" is not
converted to "_label" and send it to the list ?

Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe -as3 producing ActionScript with _label instead of label

Jake Lewis
Please see attached files:

TestButton.as does not allow that 'label' is a variable on fl.controls.LabelButton, and the corresponding _label is private.

TestTypedef.as only changes one of the references of  label to _label in the typedef.

Regards, Jake

On Sat, Oct 25, 2008 at 5:35 AM, Nicolas Cannasse <[hidden email]> wrote:
Jake Lewis a écrit :

Upon converting to the latest haXe, and converting to actionscript via the -as3 parameter, the resultant .as code has a sprinkling of the variable "label" being converted to "_label" in certain, but not all cases.

This causes a compile error in one case, and a runtime error in another.  Upon changing the variables name to 'plabel' the problem resolved.

I'm hoping this bug is restricted to the 'label' name, as I can easily search the resultant .as codebase for _label, but if it occurs for other words then I'm just going to have to find them at runtime :(

"label" is listed as an AS3 keyword, so should be always replaced with "_label" in the generated code in all cases.

Could you try to reproduce a very small example in which "label" is not converted to "_label" and send it to the list ?

Nicolas

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org

TestButton.as (442 bytes) Download Attachment
TestTypedef.as (418 bytes) Download Attachment
TestTypedef.hx (348 bytes) Download Attachment
TestButton.hx (258 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: haxe -as3 producing ActionScript with _label instead of label

Nicolas Cannasse
Jake Lewis a écrit :
> Please see attached files:
>
> TestButton.as does not allow that 'label' is a variable on
> fl.controls.LabelButton, and the corresponding _label is private.
>
> TestTypedef.as only changes one of the references of  label to _label in
> the typedef.

Should be fixed on CVS, thanks for reporting.

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org