incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik de Bruin <e...@ixsoftware.nl>
Subject Re: [ASJS] Adjusting FalconJS output (no general discussion in this thread, please)
Date Fri, 07 Dec 2012 14:14:12 GMT
- you had two blocks with the @constructor annotation, we only want
the one that was above the actual constructor function;

- really? it seems as though the two are exactly the reverse of what
they should be: the variable we declared 'private' in AS is translated
to a 'public' like implementation in JS and vice versa.

EdB



On Fri, Dec 7, 2012 at 3:09 PM, Michael Schmalle
<apache@teotigraphix.com> wrote:
>
> - Constructor jsdoc comment block, I had this already, I guess I
> misunderstood what you wrote about it, I thought you said confuses the
> compiler. (easy to add back)
>
> - constructor block, I haven't don't much with this. It's a bit hairy what
> they were doing, and even more complicated to try and explain at the moment.
> This is going to take some work to get right since they hardcoded a lot of
> stuff per their implementation.
>
> - the private and public handling is implemented by the original authors, I
> will have to re implement that specifically.
>
>
> I'll post back in a couple hours.
>
> Mike
>
>
> Quoting Erik de Bruin <erik@ixsoftware.nl>:
>
>> Overall: WOW!
>>
>> The Closure Linter seems to prefer single over double quotes, is that
>> something you have control over?
>>
>> Other details are again in the inlined comments:
>>
>> //---------------------------------------------------------
>> JS Code
>>
>> /**
>>  * CROSS-COMPILED BY MXMLJSC (329449.1) ON 2012-12-07 08:11:27
>>
>>  *
>>  * @constructor
>>  * @extends flash.display.Sprite
>>  */
>> [#Remove: the @constructor and @extends annotation should be in their
>> own JSDoc block right above the constructor function (see comment
>> below)]
>>
>> goog.provide("com.example.components.MyTextButton");
>>
>> goog.require("flash.display.Sprite");
>>
>> [#Add: the @constructor and @extends annotation go here]
>> com.example.components.MyTextButton = function()
>> {
>>                 this.publicProperty /* : Number */ = 100;
>>                 goog.base(this);
>> }
>> [#Changes:
>> - I'd place the 'super' call as the first line in the constructor
>> function;
>> - you've seem to have switched the handling of the 'private' and
>> 'public' properties (look at the names);
>> - general remark: we don't need the 'type hints' (/* : Number */ etc.)
>> at all, the '@type' JSDoc annotations are what is used by CC;
>> - each function statement should be followed by a semi-colon right
>> after the closing curly bracket;
>> ]
>>
>> goog.inherits(com.example.components.MyTextButton, flash.display.Sprite);
>>
>> /**
>>  * Member: com.example.components.MyTextButton._privateVar
>>
>>  * @private
>>  * @type {string}
>>  */
>> com.example.components.MyTextButton.prototype._privateVar /* : String
>> */ = "do ";
>>
>> /**
>>  * Member: com.example.components.MyTextButton.publicProperty
>>
>>  * @type {number}
>>  */
>> com.example.components.MyTextButton.prototype.publicProperty /* :
>> Number */ = 100;
>>
>>
>> /**
>>  * Method: com.example.components.MyTextButton.myFunction()
>>
>>  * @this {com.example.components.MyTextButton}
>>  * @param {string} value
>>  * @return {string}
>>  */
>> com.example.components.MyTextButton.prototype.myFunction =
>> function(value /* : String */) /* : String */
>> {
>>                 return (("Don't " + this._privateVar) + value);
>> }
>>
>> /JSCode
>> //------------------------------------------------------------
>>
>> Thanks,
>>
>> EdB
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>>
>
> --
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Mime
View raw message