> 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/externs/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