You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Pan Li <Pa...@Prominic.NET> on 2016/10/13 10:32:04 UTC

[FlexJS] 'new int()' causes problem in FlexJS 0.7


this line works in Flex application as expected
test = new int("123")

but it doesn't work in FlexJS 0.7, it does build but the created javascript
fails with javascript error:
Can't find variable: int


on the other hand, this does work:
test = new Number("123")


Thank you
Pan Li
http://Prominic.NET  | Skype: PanProminic
PanLi@Prominic.NET
cellphone: +86-18688880152

My Apache Flex community contribution is working on the open source
Moonshine-IDE.com for FlexJS.

Re: [FlexJS] 'new int()' causes problem in FlexJS 0.7

Posted by Alex Harui <ah...@adobe.com>.

On 10/13/16, 3:32 AM, "Pan Li" <Pa...@Prominic.NET> wrote:

>
>
>this line works in Flex application as expected
>test = new int("123")
>
>but it doesn't work in FlexJS 0.7, it does build but the created
>javascript
>fails with javascript error:
>Can't find variable: int

I'll look into it, but is there any reason to use "new"?  IOW, why not
just:

test = int("123")

-Alex