Re: [FlexJS] dts2as, meet as2dts (was: Release FlexJS/FalconJX 0.6.0)

2016-03-15 Thread Alex Harui
On 3/15/16, 3:16 PM, "Andy Dufilie" wrote: >I'm using as2dts in my own project [5] because we're writing all the GUI >in >TypeScript/React (which I highly recommend looking into) but using an AS >core [6] via FlexJS and it would be a nightmare to develop things without

Re: [2/2] git commit: [flex-falcon] [refs/heads/develop] - apparently, parseInt in JS should always specify the radix

2016-03-15 Thread Alex Harui
On 3/15/16, 3:57 PM, "omup...@gmail.com on behalf of OmPrakash Muppirala" wrote: >I think the problematic part is where strings start with "0". There might >be some browsers adding a radix of 8. This is a supposedly deprecated >feature.

Re: [2/2] git commit: [flex-falcon] [refs/heads/develop] - apparently, parseInt in JS should always specify the radix

2016-03-15 Thread OmPrakash Muppirala
I think the problematic part is where strings start with "0". There might be some browsers adding a radix of 8. This is a supposedly deprecated feature. There is no way of knowing what the browser would do by default in this case. Thanks, Om On Tue, Mar 15, 2016 at 3:33 PM, Andy Dufilie

Re: [2/2] git commit: [flex-falcon] [refs/heads/develop] - apparently, parseInt in JS should always specify the radix

2016-03-15 Thread Andy Dufilie
All these return the same result, so I don't think we need to specify the second param. I think instead the extern file should be updated to make the second param optional. parseInt("0xFF00FF", 0) parseInt("0xFF00FF", undefined) parseInt("0xFF00FF") On Tue, Mar 15, 2016 at 4:52 PM, Alex Harui

[FlexJS] dts2as, meet as2dts (was: Release FlexJS/FalconJX 0.6.0)

2016-03-15 Thread Andy Dufilie
This is great - I didn't know dts2as [1] was a thing. I recently forked as3-to-typescript [2] which uses code ported to TypeScript from FlexPMD [3], fixed all the bugs I could find, and made it output just definitions rather than trying to generate all the AS code in TS syntax. After hearing

Re: [2/2] git commit: [flex-falcon] [refs/heads/develop] - apparently, parseInt in JS should always specify the radix

2016-03-15 Thread Alex Harui
On 3/15/16, 1:35 PM, "Andy Dufilie" wrote: >It's not a good idea to make built-in functions behave differently in JS >versus AS. > >It's not a required param in AS, and this change makes the following >evaluate to true in AS but false in the cross-compiled JS:

Re: [2/2] git commit: [flex-falcon] [refs/heads/develop] - apparently, parseInt in JS should always specify the radix

2016-03-15 Thread Andy Dufilie
It's not a good idea to make built-in functions behave differently in JS versus AS. It's not a required param in AS, and this change makes the following evaluate to true in AS but false in the cross-compiled JS: Number("0xFF00FF") == parseInt("0xFF00FF") On Tue, Mar 15, 2016 at 3:22 PM, Alex

Re: [2/2] git commit: [flex-falcon] [refs/heads/develop] - apparently, parseInt in JS should always specify the radix

2016-03-15 Thread OmPrakash Muppirala
> > apparently, parseInt in JS should always specify the radix I don't think that is the case. ParseInt does this by default [1] : If the radix parameter is omitted, JavaScript assumes the following: - If the string begins with "0x", the radix is 16 (hexadecimal) - If the string begins