I'll try to test keep asdoc and compc.

When we wrote js we were not sure of naming conventions. Google seems to like 
backing variables to end with dash but flex starts with dash. Not sure what to 
do. I'm thinking we change to end with dash.


Sent from my LG G3, an AT&T 4G LTE smartphone


------ Original message------

From: Frédéric THOMAS

Date: Wed, Jun 24, 2015 4:21 PM

To: dev@flex.apache.org;

Subject:RE: [FalconJX FlexJS] JQuery up and running, a nightmare but we now 
have 1.9 in AS


I'm surprised the ./js/src is hand written as it seems "almost" the same
 than what the cross-compile code looks like, if I cross-compile Corre, I
 get in IStrand:

org_apache_flex_core_IStrand.prototype.getBeadByType = 
function(classOrInterface) {
};

in ./js/src:

/**
 * getBeadByType()
 *
 * @expose
 * @param {Object} classOrInterface The type of bead to look for.
 * @return {org_apache_flex_core_IBead} The bead.
 */
org_apache_flex_core_IStrand.prototype.getBeadByType = 
function(classOrInterface) {};

Even
 with -keep-asdoc, I haven't the comments from .as reported, neither I
have the @expose or the type annotation, but if I look at
Application.js, for the strand property, they are the same comment, why ?

/**
 * @protected
 * @type {org_apache_flex_core_IStrand}
 */
org_apache_flex_core_BeadViewBase.prototype._strand;

and in js/src

/**
 * @protected
 * @type {Object}
 */
org_apache_flex_core_BeadViewBase.prototype._strand = null;

Another thing, in ClassFactory:

org_apache_flex_core_ClassFactory = function(generator) {
  generator = typeof generator !== 'undefined' ? generator : null;
  this.generator = generator;
};

in .js/src:

org_apache_flex_core_ClassFactory = function(generator) {
  /**
   * @private
   * @type {Function}
   */
  this.generator_ = generator;
  this.properties_ = null;
};

Why to use generator_ and properties_,  reserved word ?

I
 did that as a test before I start other experiments with conditional
compilation to check if I can trust the cross-compiled code.


Frédéric THOMAS


----------------------------------------
> From: aha...@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FalconJX FlexJS] JQuery up and running, a nightmare but we now 
> have 1.9 in AS
> Date: Wed, 24 Jun 2015 22:04:23 +0000
>
> In these project directories, you should find:
>
> ./as - AS written against Flash (Sprite, TextField, etc) for SWF output
> ./asjs - AS that is written against abstractions to be used in a SWF or
> cross-compiled to js
> ./js/src - JS that is handwritten to be used on the JS side.
> ./js/out - JS that was cross-compiled from ./asjs
>
> The task is how to get rid of ./js/src and replace it with AS written
> against js.swc. I only tried Network/HTTPService and decided that
> conditional compiling would be better, but I haven’t figured out how to
> deal with different base classes like HTMLElementWrapper in js/src but not
> in as. IOW, UIBase has different base classes at some point (Sprite vs
> HTMLElementWrapper). If conditional compilation works everywhere that’s
> awesome, but if we need some other folder full of .as that only compiles
> against js.swc that’s fine too. We won’t know until we really try it. I
> wasn’t going to try right now so feel free if that’s what you want to work
> on.
>
> What happens in the build script is that ./as and ./asjs are compiled into
> a SWC with COMPC just to make sure it compiles cleanly since it runs
> faster than COMPJSC so we find errors sooner. Then COMPJSC compiles
> ./asjs into ./js/out. Then we run COMPC again to pack the ./js folder
> into the SWC. Someday the COMPJSC probably need to be able to pack the js
> directly into the SWC so we don’t have to run COMPC twice, or maybe we
> should skip the first run of COMPC.
>
> Thanks,
> -Alex
>
>
> On 6/24/15, 1:35 PM, "Michael Schmalle" <teotigraphix...@gmail.com> wrote:
>
>>On Wed, Jun 24, 2015 at 4:33 PM, Frédéric THOMAS <webdoubl...@hotmail.com>
>>wrote:
>>
>>> So, now, I guess those Core/js classes have been generated but how ?
>>> what's the process ?
>>>
>>>
>>
>>What are you talking about? As far as I know all the Core/js were and
>>written and need to be back ported to AS now. anything in an out directory
>>was generated.
>>
>>Mike
>>
>>
>>
>>>
>>> Frédéric THOMAS
>>>
>>>
>>> ----------------------------------------
>>>> From: webdoubl...@hotmail.com
>>>> To: dev@flex.apache.org
>>>> Subject: RE: [FalconJX FlexJS] JQuery up and running, a nightmare but
>>>we
>>> now have 1.9 in AS
>>>> Date: Wed, 24 Jun 2015 21:21:46 +0100
>>>>
>>>> Ok, sorry, I got it !!
>>>>
>>>> Frédéric THOMAS
>>>>
>>>>
>>>> ----------------------------------------
>>>>> From: webdoubl...@hotmail.com
>>>>> To: dev@flex.apache.org
>>>>> Subject: RE: [FalconJX FlexJS] JQuery up and running, a nightmare but
>>> we now have 1.9 in AS
>>>>> Date: Wed, 24 Jun 2015 21:03:17 +0100
>>>>>
>>>>>> Try the -keep-asdoc flag on MXMLJSC.
>>>>>
>>>>> Actually, it is what I did, I tried to compile the asjs project
>>>Core/as
>>> to js hoping to get the same result than what I can see in Core/js
>>>>>
>>>>> What it doesn't compiler the same ?
>>>>>
>>>>> Frédéric THOMAS
>>>>>
>>>>>
>>>>> ----------------------------------------
>>>>>> From: aha...@adobe.com
>>>>>> To: dev@flex.apache.org
>>>>>> Subject: Re: [FalconJX FlexJS] JQuery up and running, a nightmare
>>>but
>>> we now have 1.9 in AS
>>>>>> Date: Wed, 24 Jun 2015 17:53:56 +0000
>>>>>>
>>>>>> Try the -keep-asdoc flag on MXMLJSC. But the deal is that none of
>>>these
>>>>>> .as or .js files factor into the final app since they are all
>>>externs
>>> so
>>>>>> <inject_html> won’t be seen.
>>>>>>
>>>>>> So yes, folks can use conditional compile to add stuff, but
>>>requiring a
>>>>>> base class may be easier for the developers. Anyway, we’ll find out
>>> when
>>>>>> more people use it.
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>> On 6/24/15, 10:12 AM, "Frédéric THOMAS" <webdoubl...@hotmail.com>
>>> wrote:
>>>>>>
>>>>>>>> I’m not opposed to it. IMO, injecting Jquery’s scripts should be
>>>>>>>> automatic. It is in the FlexJS Jquery.swc because you subclass
>>>>>>>> org.apache.flex.jquery.Application and that automatically results
>>>in
>>> the
>>>>>>>> script being added to the head.
>>>>>>>>
>>>>>>>> This externs-based swc concept is too new to know what is right or
>>>>>>>>wrong.
>>>>>>>> Just keep on coding and we’ll see repeating patterns emerge and
>>>>>>>> encapsulate them. Folks will try it and like it or not. No need to
>>> guess
>>>>>>>> up front. Thanks for figuring it out.
>>>>>>>
>>>>>>>
>>>>>>>This is true it is a bit edge case, only for externs based
>>>applications
>>>>>>>at the moment, it could become less true if want to use conditional
>>>>>>>compilation for framework components too IMO and let the creator
>>>build
>>> it
>>>>>>>in one shot, in 2 shots, he could still modify the generated JS to
>>>>>>>include the <inject_html> though.
>>>>>>>
>>>>>>>Btw,
>>>>>>> I had a look at the Closure Compiler Externs Extractor [1] but the
>>>>>>>result of the extracted lib [2] doesn't show any type annotations, I
>>>>>>>guess this is normal but I wonder how those google externs like this
>>> one
>>>>>>>[3] have been built ?
>>>>>>>
>>>>>>>Another thing, why when I cross compile IStand, I don't have the
>>> comments
>>>>>>>generated like:
>>>>>>>
>>>>>>>/**
>>>>>>> * addBead()
>>>>>>> *
>>>>>>> * @expose
>>>>>>> * @param {org_apache_flex_core_IBead} bead The bead to add.
>>>>>>> */
>>>>>>>
>>>>>>>I've got that only:
>>>>>>>
>>>>>>>/**
>>>>>>> * org.apache.flex.core.IStrand
>>>>>>> *
>>>>>>> * @fileoverview
>>>>>>> *
>>>>>>> * @suppress {checkTypes}
>>>>>>> */
>>>>>>>
>>>>>>>goog.provide('org_apache_flex_core_IStrand');
>>>>>>>
>>>>>>>/**
>>>>>>> * @interface
>>>>>>> */
>>>>>>>org_apache_flex_core_IStrand = function() {
>>>>>>>};
>>>>>>>org_apache_flex_core_IStrand.prototype.addBead = function(bead) {
>>>>>>>};
>>>>>>>org_apache_flex_core_IStrand.prototype.getBeadByType =
>>>>>>>function(classOrInterface) {
>>>>>>>};
>>>>>>>org_apache_flex_core_IStrand.prototype.removeBead = function(bead) {
>>>>>>>};
>>>>>>>
>>>>>>>
>>>>>>>/**
>>>>>>> * Metadata
>>>>>>> *
>>>>>>> * @type {Object.<string, Array.<Object>>}
>>>>>>> */
>>>>>>>org_apache_flex_core_IStrand.prototype.FLEXJS_CLASS_INFO = { names:
>>>[{
>>>>>>>name: 'IStrand', qName: 'org_apache_flex_core_IStrand'}] };
>>>>>>>
>>>>>>>Thanks
>>>>>>>Frédéric THOMAS
>>>>>>>
>>>>>>>[1] http://www.dotnetwise.com/Code/Externs/
>>>>>>>[2] http://code.jquery.com/jquery-2.1.4.js
>>>>>>>[3]
>>>>>>>
>>>
>>>https://raw.githubusercontent.com/google/closure-compiler/master/contrib/
>>>e
>>>>>>>xterns/angular-1.3.js
>>>>>>>
>>>>>>>
>>>>>>>----------------------------------------
>>>>>>>> From: aha...@adobe.com
>>>>>>>> To: dev@flex.apache.org
>>>>>>>> Subject: Re: [FalconJX FlexJS] JQuery up and running, a nightmare
>>>but
>>>>>>>>we now have 1.9 in AS
>>>>>>>> Date: Wed, 24 Jun 2015 05:59:45 +0000
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 6/23/15, 10:03 PM, "Frédéric THOMAS" <webdoubl...@hotmail.com>
>>> wrote:
>>>>>>>>
>>>>>>>>>Yes, it's cool, it simplified my life as well as being able to
>>>modify
>>>>>>>>>the
>>>>>>>>>html head from AS, for example here with the dynamic loading of
>>>the
>>>>>>>>>jQuery lib but it seems I'm the only one happy with that :-)
>>>>>>>>>
>>>>>>>>>No interests to add such feature to the framework though ?
>>>>>>>>
>>>>>>>> I’m not opposed to it. IMO, injecting Jquery’s scripts should be
>>>>>>>> automatic. It is in the FlexJS Jquery.swc because you subclass
>>>>>>>> org.apache.flex.jquery.Application and that automatically results
>>>in
>>> the
>>>>>>>> script being added to the head.
>>>>>>>>
>>>>>>>> This externs-based swc concept is too new to know what is right or
>>>>>>>>wrong.
>>>>>>>> Just keep on coding and we’ll see repeating patterns emerge and
>>>>>>>> encapsulate them. Folks will try it and like it or not. No need to
>>> guess
>>>>>>>> up front. Thanks for figuring it out.
>>>>>>>>
>>>>>>>> -Alex
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>

Reply via email to