incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Schmalle <apa...@teotigraphix.com>
Subject Re: [ASJS] Adjusting FalconJS output (no general discussion in this thread, please)
Date Fri, 07 Dec 2012 19:26:30 GMT
After doing some more research, the super() implementation in general  
is a rats nest that needs to be figured out.

Can someone give me the rules as to how super works with GC? If it's  
not present etc, is super.myMethod() allowed?

Mike


Quoting Michael Schmalle <apache@teotigraphix.com>:

> Ok my head hurts after this one. Major crap to deal with, this is  
> definitely prototype code as far as flow (FalconJS).
>
> Let me know. I can already see more hassles coming with default  
> parameters. I added a get/set for you to see as well.
>
> As far as the double quotes in the expressions, that will have to wait a bit.
>
> Mike
>
> //-----------------------------------------------
> // JS CODE
>
> /**
>  * CROSS-COMPILED BY MXMLJSC (329449.1) ON 2012-12-07 13:22:04
>  */
> goog.provide("com.example.components.MyTextButton");
>
> goog.require("flash.display.Sprite");
>
>
> /**
>  * @constructor
>  * @extends {flash.display.Sprite}
>  */
> com.example.components.MyTextButton = function()
> {
> 		goog.base(this);
> 		/**
> 		 * @private
> 		 * @type {string}
> 		 */
> 		this._privateVar = 'do ';
> 		/**
> 		 * @private
> 		 * @type {string}
> 		 */
> 		this._privateVar2 = 'do not ';
> };
>
> goog.inherits(com.example.components.MyTextButton, flash.display.Sprite);
>
> /** @type {number} */
> com.example.components.MyTextButton.prototype.publicProperty = 100;
>
>
> /**
>  * @this {com.example.components.MyTextButton}
>  * @return {string}
>  */
> com.example.components.MyTextButton.prototype.get_foo = function()
> {
> 		return "baz";
> };
>
> /**
>  * @this {com.example.components.MyTextButton}
>  * @param {string} value
>  */
> com.example.components.MyTextButton.prototype.set_foo = function(value)
> {
> 		this._privateVar = value;
> };
>
> /**
>  * @this {com.example.components.MyTextButton}
>  * @param {string} value
>  * @return {string}
>  */
> com.example.components.MyTextButton.prototype.myFunction = function(value)
> {
> 		return (("Don't " + this._privateVar) + value);
> };
>
>
> //---------------------------------------------------------
>
> Mike
>
>
>
>
>
> Quoting Erik de Bruin <erik@ixsoftware.nl>:
>
>> Mike,
>>
>> I'm trying to keep up, but you're going so fast I seem to be missing
>> steps. Please ignore my 'duplicates' :-)
>>
>> The 'private' var declaration should look like this:
>>
>> /**
>> * @private
>> * @type {string}
>> */
>> this._privateVar = '_do';
>>
>> I agree on the whitespace certainly not being a priority, I'm just
>> channeling the Linter ;-)
>>
>> And we thank 'them' for adding all the stuff, but now it's "ours", so
>> (with very low priority) I say: "get rid of it."
>>
>> EdB
>>
>>
>>
>> On Fri, Dec 7, 2012 at 4:27 PM, Michael Schmalle
>> <apache@teotigraphix.com> wrote:
>>>
>>> Quoting Erik de Bruin <erik@ixsoftware.nl>:
>>>
>>>> Closer ;-)
>>>>
>>>> I'll list all my little nags, I hope I don't start to bore you or
>>>> unnecessarily repeat myself.
>>>>
>>>> - I'm still seeing the public property from AS back instead of the
>>>> private var in the constructor, without a @type annotation, but with a
>>>> /* : type hint */
>>>> - the private var seems to have gone completely;
>>>> - the goog.base call should be the first line in the constructor function;
>>>
>>>
>>>
>>> READ what I wrote below, I said that is what I was working on. ;-)
>>>
>>> So WHEN I get the private property in the constructor how is the type
>>> annotation supposed to look?
>>>
>>> // @type {string
>>> this.__privateVar = "_do ";
>>>
>>> Like the above?
>>>
>>>
>>>
>>>> - the @extends annotation should have curly brackets around the type:
>>>> @extends {flash.display.Sprite}
>>>
>>>
>>> easy
>>>
>>>
>>>> - I'm missing the semi colons after the last curly bracket of a function
>>>> block;
>>>
>>>
>>> I realized this right after I pressed send
>>>
>>>
>>>> - there are some whitespace issues (this is where the nagging gets
>>>> real bad, sorry):
>>>>    - in the second and third JSDoc blocks there is an extra line
>>>>    - the opening curly brackets of a function block should be on the
>>>> same line as the function keyword and behind the arguments, separated
>>>> by one (1) space
>>>
>>>
>>> Whitespace is my last concern since it has to do with indenting. I  
>>> am trying
>>> to get the "meat" working. I still need to test set/get and other things.
>>> This is just round 1.
>>>
>>>
>>>> - personally, I would get rid of the 'Member' and 'Method' lines in
>>>> the JSDoc blocks, they don't provide useful information, they merely
>>>> state the name of the item, which is clearly readable a few short
>>>> lines later ;-)
>>>
>>>
>>> Right, remember this stuff was added by them.
>>>
>>> Mike
>>>
>>>
>>>
>>>> EdB
>>>>
>>>>
>>>> On Fri, Dec 7, 2012 at 4:01 PM, Michael Schmalle
>>>> <apache@teotigraphix.com> wrote:
>>>>>
>>>>> Ok next iteration;
>>>>>
>>>>> - I'm working on the constructor block right now so that private var
>>>>> isn't
>>>>> showing up yet.
>>>>> - As far as I have seen that was the only lagging issue from the last
>>>>> post.
>>>>>
>>>>> Are the tags and stuff correct?
>>>>>
>>>>>
>>>>>
>>>>> //---------------------------------------------------------
>>>>> JS CODE
>>>>>
>>>>>
>>>>> /**
>>>>> * CROSS-COMPILED BY MXMLJSC (329449.1) ON 2012-12-07 09:57:20
>>>>> */
>>>>>
>>>>> goog.provide("com.example.components.MyTextButton");
>>>>>
>>>>> goog.require("flash.display.Sprite");
>>>>>
>>>>> /**
>>>>>
>>>>> * @constructor
>>>>> * @extends flash.display.Sprite
>>>>> */
>>>>> com.example.components.MyTextButton = function()
>>>>> {
>>>>>                this.publicProperty /* : Number */ = 100;
>>>>>                goog.base(this);
>>>>> }
>>>>>
>>>>> goog.inherits(com.example.components.MyTextButton, flash.display.Sprite);
>>>>>
>>>>> /**
>>>>>
>>>>> * Member: com.example.components.MyTextButton.publicProperty
>>>>> * @type {number}
>>>>> */
>>>>> com.example.components.MyTextButton.prototype.publicProperty = 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)
>>>>>
>>>>> {
>>>>>                return (("Don't " + this._privateVar) + value);
>>>>> }
>>>>>
>>>>>
>>>>> //--------------------------------------------------------------
>>>>>
>>>>>
>>>>> Mike
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> 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
>>>>
>>>
>>> --
>>> 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
>>
>
> -- 
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>
>

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Mime
View raw message