Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7E3E9EE3 for ; Fri, 7 Dec 2012 19:36:13 +0000 (UTC) Received: (qmail 59192 invoked by uid 500); 7 Dec 2012 19:36:12 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 59161 invoked by uid 500); 7 Dec 2012 19:36:12 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 59153 invoked by uid 99); 7 Dec 2012 19:36:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2012 19:36:12 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.223.182] (HELO mail-ie0-f182.google.com) (209.85.223.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2012 19:36:06 +0000 Received: by mail-ie0-f182.google.com with SMTP id s9so2941606iec.27 for ; Fri, 07 Dec 2012 11:35:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=hgnmlOvoatuTQf+my8sQHjc9wPGREow1OPz2mNzr6ns=; b=Zn54/3+m7q99r46c7hilzP/g9GI2zHtiwsyQ37C8ULJeqQVLDPh2hwEok9yXF01isl wUT/EiehXXOjKBYgCs/Zcff2wuLVnzpmiYGuPPNgHEHNXEj5Fp9PDduaSAeNdKRHSRP5 QUm9sKEo/wN49xiiXTNFajNDoeV3467OBRguXqYbGGOZ8FgZT8w0BDf9+NY8GUG3icYK jkqEaRailHZpmid+SLZw/36qPM8DEtpgbG28AF2WV34nZNbFeMRtgbSdXUfNSOy5sY7W vvhl50bbgwZQIl2ltwXwzZ7lkh5zrmreOh7vvBOVaTf/Ts60P8hPpAq1VqcTvG0Kvg6h ZwnQ== MIME-Version: 1.0 Received: by 10.50.214.97 with SMTP id nz1mr109900igc.36.1354908944051; Fri, 07 Dec 2012 11:35:44 -0800 (PST) Received: by 10.64.34.234 with HTTP; Fri, 7 Dec 2012 11:35:43 -0800 (PST) In-Reply-To: <20121207142630.45212yeshk8g959i@franklin.liquidweb.com> References: <20121207081513.7696728im84x0xr5@franklin.liquidweb.com> <20121207090945.17551cvvk7apcy3t@franklin.liquidweb.com> <20121207100130.179441scvue0mzey@franklin.liquidweb.com> <20121207102705.33717wsadaemzg7d@franklin.liquidweb.com> <20121207132443.84211x6by5tdfgx7@franklin.liquidweb.com> <20121207142630.45212yeshk8g959i@franklin.liquidweb.com> Date: Fri, 7 Dec 2012 20:35:43 +0100 Message-ID: Subject: Re: [ASJS] Adjusting FalconJS output (no general discussion in this thread, please) From: Erik de Bruin To: "flex-dev@incubator.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnQzYvQth3VTqrAkFtou2y6ovqOc7GkC6G8DBcCn8q3p6KNZtZ3qb9x5sqRQG+wSo0PNVM1 X-Virus-Checked: Checked by ClamAV on apache.org In GC, in combination with the way we set up inheritance, 'super()' is 'goog.base()': [1] If called from the constructor - as we already implemented - 'this' is the only argument. If calling a super method, use 'goog.base(this, "methodName", args)' EdB 1: http://closure-library.googlecode.com/svn/docs/closure_goog_base.js.html On Fri, Dec 7, 2012 at 8:26 PM, Michael Schmalle wrote: > 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 : > >> 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 : >> >>> 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 >>> wrote: >>>> >>>> >>>> Quoting Erik de Bruin : >>>> >>>>> 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 >>>>> 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 > -- Ix Multimedia Software Jan Luykenstraat 27 3521 VB Utrecht T. 06-51952295 I. www.ixsoftware.nl