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 6D041E545 for ; Thu, 6 Dec 2012 22:58:54 +0000 (UTC) Received: (qmail 2885 invoked by uid 500); 6 Dec 2012 22:58:53 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 2834 invoked by uid 500); 6 Dec 2012 22:58:53 -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 2822 invoked by uid 99); 6 Dec 2012 22:58:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 22:58:53 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aharui@adobe.com designates 64.18.1.191 as permitted sender) Received: from [64.18.1.191] (HELO exprod6og106.obsmtp.com) (64.18.1.191) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 22:58:46 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob106.postini.com ([64.18.5.12]) with SMTP ID DSNKUMEjEWUNxbXUy9UlmLXgpn47Bfz8UfFJ@postini.com; Thu, 06 Dec 2012 14:58:26 PST Received: from inner-relay-1.corp.adobe.com (ms-exchange.macromedia.com [153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id qB6MwOuN017168 for ; Thu, 6 Dec 2012 14:58:24 -0800 (PST) Received: from nacas01.corp.adobe.com (nacas01.corp.adobe.com [10.8.189.99]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id qB6MwNAV023222 for ; Thu, 6 Dec 2012 14:58:23 -0800 (PST) Received: from NAMBX02.corp.adobe.com ([10.8.127.96]) by nacas01.corp.adobe.com ([10.8.189.99]) with mapi; Thu, 6 Dec 2012 14:58:23 -0800 From: Alex Harui To: "flex-dev@incubator.apache.org" Date: Thu, 6 Dec 2012 14:58:21 -0800 Subject: Re: [ASJS] Some information on "templates" Thread-Topic: [ASJS] Some information on "templates" Thread-Index: Ac3UBB6vspwuyREKTRymBiU6KDm63wAARFhi Message-ID: In-Reply-To: <20121206175007.87370ima7whw1dzz@franklin.liquidweb.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-Entourage/13.13.0.120411 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Awesome! On 12/6/12 2:50 PM, "Michael Schmalle" wrote: >=20 > Erik, >=20 > I got your project to compile and create the minified .js! > FlexJSTest_dummy app I used. >=20 > The only thing I had to do was install python. A note to others, if > you try this on Windows 7, there seems to be an issue with file > encoding and the closure compiler using python 3.3. I had to uninstall > 3.3 and install python 2.7 (and put python in the PATH). >=20 > Once I had that, I just ran with the command in the /publisher > directory; ant -Dapp.name=3DFlexJSTest_dummy >=20 > It compiled the framework and app classes to the FlexJS.js file and > loader html file. Loaded in the browser and pushed the button, > galvanize! >=20 > Mike >=20 >=20 > Quoting Erik de Bruin : >=20 >> No framework classes are cross compiled. Only project AS files are run >> through FalconJS before they are combined with the JS framework through = the >> Closure Builder. >>=20 >> The AS framework is there to allow for project development in Flash >> Builder. Our job as developers is to provide both sides of the fence (AS >> and JS framework) with matching functionality so the compiled project JS >> files will behave the same in a browser as their AS equivalent does in = the >> Flash Player. >>=20 >> EdB >>=20 >>=20 >>=20 >> On Thursday, December 6, 2012, Michael @er5ik68Schmalle wrote: >>=20 >>> Erik, >>>=20 >>> I'm trying to get clear on something. >>>=20 >>> What exact classes or interfaces get translated from .as to .js from th= e >>> framework directories? >>>=20 >>> What files are going to be maintained by hand and tests? I'm still a bi= t >>> confused to the flow. >>>=20 >>> You have FlexObject.js, FlexGlobals.js which obviously has no correlati= on >>> in .as. What about that? >>>=20 >>>=20 >>> Mike >>>=20 >>>=20 >>>=20 >>>=20 >>> Quoting Erik de Bruin : >>>=20 >>> That looks very promising! Some tweaking is needed, and some of the >>> output (the bottom part mostly, I guess that is for some kind of >>> introspection that is in my template provided by other methods) isn't >>> needed, at least not from what I understand. >>>=20 >>> I'll look into the details of the new output tomorrow and indicate if >>> and what changes would be nice ;-) >>>=20 >>> EdB >>>=20 >>>=20 >>> On Thu, Dec 6, 2012 at 7:01 PM, Michael Schmalle >>> wrote: >>>=20 >>> Hi, >>>=20 >>> Right now after about 5 hours of researching and messing around I can g= et >>> the following using the closure compiler flag; >>>=20 >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D**=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D**=3D=3D=3D=3D=3D=3D=3D >>> AS CODE >>>=20 >>>=20 >>> package com.example.components >>> { >>>=20 >>> import flash.display.Sprite; >>>=20 >>> public class MyTextButton extends Sprite >>> { >>> public function MyTextButton() >>>=20 >>> { >>> super(); >>> } >>>=20 >>> private var _privateVar:String =3D "do "; >>>=20 >>> public var publicProperty:Number =3D 100; >>>=20 >>> public function myFunction(value: String): String >>> { >>> return "Don't " + _privateVar + value; >>> } >>> } >>> } >>>=20 >>>=20 >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D**=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D**=3D=3D=3D=3D=3D=3D=3D >>> JS CODE >>>=20 >>> /** @preserve CROSS-COMPILED BY MXMLJSC (329449.1) ON 2012-12-06 12:55:= 52 >>> */ >>> /** >>> * CROSS-COMPILED BY MXMLJSC (329449.1) ON 2012-12-06 12:52:19 >>> * >>> * Class: com.example.components.**MyTextButton >>> * @constructor >>> * @extends flash.display.Sprite >>> */ >>>=20 >>> // Constructor >>>=20 >>>=20 >>> /** >>> * Constructor: com.example.components.**MyTextButton() >>> * @constructor >>> * @this {com.example.components} >>> */ >>> com.example.components.**MyTextButton =3D function() >>> { >>> var self =3D this; >>> self.publicProperty /* : Number */ =3D 100; >>> goog.base(this); >>> return self; >>> } >>>=20 >>>=20 >>> goog.inherits(com.example.**components.MyTextButton, >>> flash.display.Sprite); >>>=20 >>> /** >>> * Member: com.example.components.**MyTextButton.prototype._CLASS >>> * @const >>> * @type {com.example.components.**MyTextButton} >>> */ >>> com.example.components.**MyTextButton.prototype._CLASS =3D >>> com.example.components.**MyTextButton; >>> ; >>>=20 >>> /** >>> * Member: com.example.components.**MyTextButton._privateVar >>>=20 >>> * @private >>> * @type {string} >>> */ >>> com.example.components.**MyTextButton.prototype._**privateVar /* : Stri= ng >>> */ =3D >>> "do "; >>> ; >>>=20 >>> /** >>> * Member: com.example.components.**MyTextButton.publicProperty >>> * @type {number} >>> */ >>> com.example.components.**MyTextButton.prototype.**publicProperty /* : >>> Number */ >>> =3D 100; >>> ; >>>=20 >>>=20 >>> /** >>> * Method: com.example.components.**MyTextButton.myFunction() >>> * @this {com.example.components.**MyTextButton} >>> * @param {string} value >>> * @return {string} >>> */ >>> com.example.components.**MyTextButton.prototype.**myFunction =3D >>> function(value /* >>> : String */) /* : String */ >>> { >>> /** @type {com.example.components.**MyTextButton} */ >>> var self =3D this; >>> return (("Don't " + self._privateVar) + value); >>> } >>>=20 >>> /** >>> * Member: com.example.components.**MyTextButton._PACKAGE >>> * @const >>> * @type {com.example.components} >>> */ >>> com.example.components.**MyTextButton._PACKAGE =3D com.example.componen= ts; >>>=20 >>>=20 >>> /** >>> * Member: com.example.components.**MyTextButton._NAME >>> * @const >>> * @type {string} >>> */ >>> com.example.components.**MyTextButton._NAME =3D "MyTextButton"; >>>=20 >>> /** >>> * Member: com.example.components.**MyTextButton._FULLNAME >>> * @const >>> * @type {string} >>> */ >>> com.example.components.**MyTextButton._FULLNAME =3D >>> "com.example.components.**MyTextButton"; >>>=20 >>> /** >>> * Member: com.example.components.**MyTextButton._SUPER >>> * @const >>> * @type {flash.display.Sprite} >>> */ >>> com.example.components.**MyTextButton._SUPER =3D flash.display.Sprite; >>>=20 >>> /** >>> * Member: com.example.components.**MyTextButton._NAMESPACES >>> * @const >>> * @type {Object} >>> */ >>> com.example.components.**MyTextButton._NAMESPACES =3D { >>> "_privateVar::7:com.example.**components.MyTextButton" : tr >>>=20 >>>=20 >>=20 >> -- >> Ix Multimedia Software >>=20 >> Jan Luykenstraat 27 >> 3521 VB Utrecht >>=20 >> T. 06-51952295 >> I. www.ixsoftware.nl >>=20 --=20 Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui