On 3/31/16, 7:44 PM, "Josh Tynjala" <joshtynj...@gmail.com> wrote:

>The constructor property probably returns a Function in JavaScript.

That's what the GCC externs says, but that caused problems for us, so it
is currently hacked to return "Class".

IIRC, if it returns Function you can't access any properties on it.
Definitely could use a re-think.  I also know that in the Spark/MX code
I'm trying to cross-compile, there is a lot of references to Class so we
defined one in missing.js.

The problem there is that the use of "as" calls into Language.as which
doesn't special case Class.  Maybe it should.

Thoughts?
-Alex

>
>- Josh
>On Mar 31, 2016 7:19 PM, "Nimai" <ni...@beecavegames.com> wrote:
>
>> Any support for the "constructor" property for Objects in FalconJX?
>>
>> 
>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Object
>>.html#constructor
>>
>> Right now the following translation occurs:
>> [AS3]
>>         var c1:Class = Object(this).constructor as Class;
>>         var c2:Class = this["constructor"] as Class;
>>
>> [JS]
>>         var /** @type {Object} */ c1 =
>> org.apache.flex.utils.Language.as(Object(this).constructor, Class);
>>         var /** @type {Object} */ c2 =
>> org.apache.flex.utils.Language.as(this["constructor"], Class);
>>
>> And this happens at runtime:
>>         Uncaught ReferenceError: Class is not defined
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> 
>>http://apache-flex-development.2333347.n4.nabble.com/The-Class-type-tp520
>>96.html
>> Sent from the Apache Flex Development mailing list archive at
>>Nabble.com.
>>

Reply via email to