You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Frédéric THOMAS <we...@hotmail.com> on 2015/08/09 13:28:51 UTC

Re : Re: [FlexJS] Framework using externs (was: Setup Error)

That's that Mike.
I don't use the externc.

--- Message initial ---

De : "Michael Schmalle" <te...@gmail.com>
Envoyé : 9 août 2015 11:59
A : dev@flex.apache.org
Objet : Re: [FlexJS] Framework using externs (was: Setup Error)

On Sun, Aug 9, 2015 at 1:06 AM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 8/8/15, 12:38 PM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >On Sat, Aug 8, 2015 at 1:39 PM, Frédéric THOMAS <we...@hotmail.com>
> >wrote:
> >
> >> Also, What to do to keep as doc, I've been trying -keep-asdoc but
> >>
> >>
> >Fred, I looked at the code quickly, this should work right now and
> >-keep-asdoc is ONLY for the @param description etc.
>
> It is supposed to grab all of the asdoc from the AS and append to the
> JSDoc.  It sounds like the JSDoc emitter isn’t wired up correctly, and it
> is possible that the asdoc delegate is no longer configured correctly for
> externs.
>
> -Alex
>
>
What is this thread actually about, I was aware of what was being copied
but I thought this was about porting FlexJS .js code to AS classes.

Is Fred making extern files for FlexJS code? If he is porting, then he is
using the FlexJS emitter, I didn't do anything weird, is he using the JSC
compiler?

Mike

Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.

On 8/19/15, 4:06 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>> >For the rest of the class, the type var is in the super class, I didn't
>> >get why it has been added to the class, any idea ?
>> 
>> Maybe to @export it?
>
>Maybe I don't get it, what is the interest to export it ?

We currently export way more than we need to because things like
dataBinding and MXML attribute assignments use string names.  The Google
Closure Compiler may rename ’type' to ‘qq’.

Subclassing works fine, just name lookups fail.  Even event[‘type’] can
fail after optimization.

-Alex		 	   		   		 	   		  


RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
> >For the rest of the class, the type var is in the super class, I didn't
> >get why it has been added to the class, any idea ?
> 
> Maybe to @export it?

Maybe I don't get it, what is the interest to export it ? 

In goog.events.Event it is declared like that:

goog.events.Event = function(type, opt_target) {
  /**
   * Event type.
   * @type {string}
   */
  this.type = type instanceof goog.events.EventId ? String(type) : type;

Does it mean I can't use it in subclasses ?

Frédéric THOMAS

From: webdoublefx@hotmail.com
To: dev@flex.apache.org
Subject: RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
Date: Thu, 20 Aug 2015 00:05:13 +0100




> >For the rest of the class, the type var is in the super class, I didn't
> >get why it has been added to the class, any idea ?
> 
> Maybe to @export it?

Maybe I don't get it, what is the interest to export it ? 

In goog.events.Event it is declared like that:


Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Wed, 19 Aug 2015 21:47:17 +0000
> 
> 
> 
> On 8/19/15, 2:17 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >
> >
> >
> >Hi,
> >
> >Actually, I was trying to translate event.js and seen:
> >
> >// EventHandler and ErrorHandler are not listed as deps for
> >// some of the event classes because they would cause
> >// circularities so we force them in here.
> >
> >goog.require('goog.debug.ErrorHandler');
> >goog.require('goog.events.EventHandler');
> >
> >I didn't get why this classes should be forced though ?
> 
> You can try doing it as ‘expected’.  That could be old code, but GCL is
> picky about circular dependencies.
> 
> >
> >I started to create an extern for GCL, at least the parts needed, it was
> >partly generated, partly hand coded and I haven't been able to compile it
> >with Ant, I created a project in IJ instead at the moment and just
> >started to use the GCL.swc now.
> >
> >For the rest of the class, the type var is in the super class, I didn't
> >get why it has been added to the class, any idea ?
> 
> Maybe to @export it?
> 
> >I don't see any reason either why CHANGE should be in
> >org.apache.flex.events.Event.EventType, any idea ?
> 
> Probably because it is a commonly used event name.  It doesn’t have to be
> that way.
> 
> >
> >/**
> > * Enum type for the events fired by the FlexJS Event
> > * @enum {string}
> > */
> >org.apache.flex.events.Event.EventType = {
> >    CHANGE: 'change'
> >  };
> >
> >
> >/**
> > * @export
> > * @type {string} type The event type.
> > */
> >org.apache.flex.events.Event.prototype.type = '';
> >
> >
> >/**
> > * @export
> > * @param {string} type The event type.
> > */
> >org.apache.flex.events.Event.prototype.init = function(type) {
> >  this.type = type;
> >};
> >
> >So, I simply translated it like that:
> >
> >    COMPILE::JS
> >    public class Event extends goog.events.Event {
> >
> >        public static const CHANGE:String = "change";
> >
> >        public function Event(type:String, target:Object = null) {
> >            super(type, target);
> >        }
> >
> >        public function init(type:String):void {
> >            this.type = type;
> >        }
> >    }
> >
> >Does it seem ok ?
> 
> I think so.
> 
> >
> >It takes time because I'm reviewing in the same time and my time is
> >limited.
> 
> Thanks for working on it.  Every little bit helps.
> 
> -Alex
> 		 	   		  
> 
 		 	   		   		 	   		  

RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
> >For the rest of the class, the type var is in the super class, I didn't
> >get why it has been added to the class, any idea ?
> 
> Maybe to @export it?

Maybe I don't get it, what is the interest to export it ? 

In goog.events.Event it is declared like that:


Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Wed, 19 Aug 2015 21:47:17 +0000
> 
> 
> 
> On 8/19/15, 2:17 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >
> >
> >
> >Hi,
> >
> >Actually, I was trying to translate event.js and seen:
> >
> >// EventHandler and ErrorHandler are not listed as deps for
> >// some of the event classes because they would cause
> >// circularities so we force them in here.
> >
> >goog.require('goog.debug.ErrorHandler');
> >goog.require('goog.events.EventHandler');
> >
> >I didn't get why this classes should be forced though ?
> 
> You can try doing it as ‘expected’.  That could be old code, but GCL is
> picky about circular dependencies.
> 
> >
> >I started to create an extern for GCL, at least the parts needed, it was
> >partly generated, partly hand coded and I haven't been able to compile it
> >with Ant, I created a project in IJ instead at the moment and just
> >started to use the GCL.swc now.
> >
> >For the rest of the class, the type var is in the super class, I didn't
> >get why it has been added to the class, any idea ?
> 
> Maybe to @export it?
> 
> >I don't see any reason either why CHANGE should be in
> >org.apache.flex.events.Event.EventType, any idea ?
> 
> Probably because it is a commonly used event name.  It doesn’t have to be
> that way.
> 
> >
> >/**
> > * Enum type for the events fired by the FlexJS Event
> > * @enum {string}
> > */
> >org.apache.flex.events.Event.EventType = {
> >    CHANGE: 'change'
> >  };
> >
> >
> >/**
> > * @export
> > * @type {string} type The event type.
> > */
> >org.apache.flex.events.Event.prototype.type = '';
> >
> >
> >/**
> > * @export
> > * @param {string} type The event type.
> > */
> >org.apache.flex.events.Event.prototype.init = function(type) {
> >  this.type = type;
> >};
> >
> >So, I simply translated it like that:
> >
> >    COMPILE::JS
> >    public class Event extends goog.events.Event {
> >
> >        public static const CHANGE:String = "change";
> >
> >        public function Event(type:String, target:Object = null) {
> >            super(type, target);
> >        }
> >
> >        public function init(type:String):void {
> >            this.type = type;
> >        }
> >    }
> >
> >Does it seem ok ?
> 
> I think so.
> 
> >
> >It takes time because I'm reviewing in the same time and my time is
> >limited.
> 
> Thanks for working on it.  Every little bit helps.
> 
> -Alex
> 		 	   		  
> 
 		 	   		  

Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.

On 8/19/15, 2:17 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>
>
>
>Hi,
>
>Actually, I was trying to translate event.js and seen:
>
>// EventHandler and ErrorHandler are not listed as deps for
>// some of the event classes because they would cause
>// circularities so we force them in here.
>
>goog.require('goog.debug.ErrorHandler');
>goog.require('goog.events.EventHandler');
>
>I didn't get why this classes should be forced though ?

You can try doing it as ‘expected’.  That could be old code, but GCL is
picky about circular dependencies.

>
>I started to create an extern for GCL, at least the parts needed, it was
>partly generated, partly hand coded and I haven't been able to compile it
>with Ant, I created a project in IJ instead at the moment and just
>started to use the GCL.swc now.
>
>For the rest of the class, the type var is in the super class, I didn't
>get why it has been added to the class, any idea ?

Maybe to @export it?

>I don't see any reason either why CHANGE should be in
>org.apache.flex.events.Event.EventType, any idea ?

Probably because it is a commonly used event name.  It doesn’t have to be
that way.

>
>/**
> * Enum type for the events fired by the FlexJS Event
> * @enum {string}
> */
>org.apache.flex.events.Event.EventType = {
>    CHANGE: 'change'
>  };
>
>
>/**
> * @export
> * @type {string} type The event type.
> */
>org.apache.flex.events.Event.prototype.type = '';
>
>
>/**
> * @export
> * @param {string} type The event type.
> */
>org.apache.flex.events.Event.prototype.init = function(type) {
>  this.type = type;
>};
>
>So, I simply translated it like that:
>
>    COMPILE::JS
>    public class Event extends goog.events.Event {
>
>        public static const CHANGE:String = "change";
>
>        public function Event(type:String, target:Object = null) {
>            super(type, target);
>        }
>
>        public function init(type:String):void {
>            this.type = type;
>        }
>    }
>
>Does it seem ok ?

I think so.

>
>It takes time because I'm reviewing in the same time and my time is
>limited.

Thanks for working on it.  Every little bit helps.

-Alex
		 	   		  


Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.

On 8/19/15, 3:57 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>Also, I don't know what to do with Language as() is(), there are reserved
>words, should we change them ?

I’m ok with changing it.

-Alex


RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
Also, I don't know what to do with Language as() is(), there are reserved words, should we change them ?

Frédéric THOMAS

From: webdoublefx@hotmail.com
To: dev@flex.apache.org
Subject: RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
Date: Wed, 19 Aug 2015 22:17:29 +0100







Hi,

Actually, I was trying to translate event.js and seen:

// EventHandler and ErrorHandler are not listed as deps for
// some of the event classes because they would cause
// circularities so we force them in here.

goog.require('goog.debug.ErrorHandler');
goog.require('goog.events.EventHandler');

I didn't get why this classes should be forced though ?

I started to create an extern for GCL, at least the parts needed, it was partly generated, partly hand coded and I haven't been able to compile it with Ant, I created a project in IJ instead at the moment and just started to use the GCL.swc now.

For the rest of the class, the type var is in the super class, I didn't get why it has been added to the class, any idea ?
I don't see any reason either why CHANGE should be in org.apache.flex.events.Event.EventType, any idea ?

/**
 * Enum type for the events fired by the FlexJS Event
 * @enum {string}
 */
org.apache.flex.events.Event.EventType = {
    CHANGE: 'change'
  };


/**
 * @export
 * @type {string} type The event type.
 */
org.apache.flex.events.Event.prototype.type = '';


/**
 * @export
 * @param {string} type The event type.
 */
org.apache.flex.events.Event.prototype.init = function(type) {
  this.type = type;
};

So, I simply translated it like that:

    COMPILE::JS
    public class Event extends goog.events.Event {

        public static const CHANGE:String = "change";

        public function Event(type:String, target:Object = null) {
            super(type, target);
        }

        public function init(type:String):void {
            this.type = type;
        }
    }

Does it seem ok ?

It takes time because I'm reviewing in the same time and my time is limited.

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Tue, 11 Aug 2015 18:21:17 +0100
> 
> > That’s convenient, but my main point was to reduce the number of
> > databinding expressions in MXML that have to be written by the developer,
> > and set up and run at startup.
> 
> Oh yeah, you are right, I didn't it read well, but still, usually for a library, even more a public one, I can pay a bit more to have something squared, the point is how much :-)
> 
> > Anyway, not a major issue for me at this time. I’m way more interested in
> > seeing how easy/hard it will be do convert our JS back to AS.
> 
> yep !
> 
> Frédéric THOMAS
> 
> 
> ----------------------------------------
> > From: aharui@adobe.com
> > To: dev@flex.apache.org
> > Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> > Date: Tue, 11 Aug 2015 16:57:42 +0000
> >
> >
> >
> > On 8/11/15, 8:15 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> >
> >>>Also, another point I just remembered is MXML. I don’t know that
> >>> MouseButton would actually show up in MXML attribute values but for
> >>>other
> >>> things it might be better to use simple String constants and do extra
> >>> checking inside so your MXML looks like:
> >>>
> >>> <sometag someAttribute=“someValue” />
> >>>
> >>> Instead of
> >>>
> >>> <sometag someAttribute=“{SomeClass.someValue}” />
> >>>
> >>> Or
> >>>
> >>> <sometag someAttribute=“{new UtilityClass(‘someValue’))}”
> >>>
> >>> At least for now until someone figures out how to get the compiler to
> >>> optimize out the binding expression. I’ve always wished we could do:
> >>>
> >>> <sometag someAttribute=“SomeClass.someConst” />
> >>
> >>In libraries, for the Enum like classes, I use to add things like
> >>MyEnum.fromIndex(index:uint):MyEnum and
> >>MyEnum.fromLabel(label:String):MyEnum, so, it can be used in the same way
> >>than "new UtilityClass(‘someValue’))" but it belongs the same class where
> >>the data resides.
> >
> > That’s convenient, but my main point was to reduce the number of
> > databinding expressions in MXML that have to be written by the developer,
> > and set up and run at startup.
> >
> > Anyway, not a major issue for me at this time. I’m way more interested in
> > seeing how easy/hard it will be do convert our JS back to AS.
> >
> > Thanks for working on it,
> > -Alex
> >
> >
>  		 	   		  

 		 	   		   		 	   		  

RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.


Hi,

Actually, I was trying to translate event.js and seen:

// EventHandler and ErrorHandler are not listed as deps for
// some of the event classes because they would cause
// circularities so we force them in here.

goog.require('goog.debug.ErrorHandler');
goog.require('goog.events.EventHandler');

I didn't get why this classes should be forced though ?

I started to create an extern for GCL, at least the parts needed, it was partly generated, partly hand coded and I haven't been able to compile it with Ant, I created a project in IJ instead at the moment and just started to use the GCL.swc now.

For the rest of the class, the type var is in the super class, I didn't get why it has been added to the class, any idea ?
I don't see any reason either why CHANGE should be in org.apache.flex.events.Event.EventType, any idea ?

/**
 * Enum type for the events fired by the FlexJS Event
 * @enum {string}
 */
org.apache.flex.events.Event.EventType = {
    CHANGE: 'change'
  };


/**
 * @export
 * @type {string} type The event type.
 */
org.apache.flex.events.Event.prototype.type = '';


/**
 * @export
 * @param {string} type The event type.
 */
org.apache.flex.events.Event.prototype.init = function(type) {
  this.type = type;
};

So, I simply translated it like that:

    COMPILE::JS
    public class Event extends goog.events.Event {

        public static const CHANGE:String = "change";

        public function Event(type:String, target:Object = null) {
            super(type, target);
        }

        public function init(type:String):void {
            this.type = type;
        }
    }

Does it seem ok ?

It takes time because I'm reviewing in the same time and my time is limited.

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Tue, 11 Aug 2015 18:21:17 +0100
> 
> > That’s convenient, but my main point was to reduce the number of
> > databinding expressions in MXML that have to be written by the developer,
> > and set up and run at startup.
> 
> Oh yeah, you are right, I didn't it read well, but still, usually for a library, even more a public one, I can pay a bit more to have something squared, the point is how much :-)
> 
> > Anyway, not a major issue for me at this time. I’m way more interested in
> > seeing how easy/hard it will be do convert our JS back to AS.
> 
> yep !
> 
> Frédéric THOMAS
> 
> 
> ----------------------------------------
> > From: aharui@adobe.com
> > To: dev@flex.apache.org
> > Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> > Date: Tue, 11 Aug 2015 16:57:42 +0000
> >
> >
> >
> > On 8/11/15, 8:15 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> >
> >>>Also, another point I just remembered is MXML. I don’t know that
> >>> MouseButton would actually show up in MXML attribute values but for
> >>>other
> >>> things it might be better to use simple String constants and do extra
> >>> checking inside so your MXML looks like:
> >>>
> >>> <sometag someAttribute=“someValue” />
> >>>
> >>> Instead of
> >>>
> >>> <sometag someAttribute=“{SomeClass.someValue}” />
> >>>
> >>> Or
> >>>
> >>> <sometag someAttribute=“{new UtilityClass(‘someValue’))}”
> >>>
> >>> At least for now until someone figures out how to get the compiler to
> >>> optimize out the binding expression. I’ve always wished we could do:
> >>>
> >>> <sometag someAttribute=“SomeClass.someConst” />
> >>
> >>In libraries, for the Enum like classes, I use to add things like
> >>MyEnum.fromIndex(index:uint):MyEnum and
> >>MyEnum.fromLabel(label:String):MyEnum, so, it can be used in the same way
> >>than "new UtilityClass(‘someValue’))" but it belongs the same class where
> >>the data resides.
> >
> > That’s convenient, but my main point was to reduce the number of
> > databinding expressions in MXML that have to be written by the developer,
> > and set up and run at startup.
> >
> > Anyway, not a major issue for me at this time. I’m way more interested in
> > seeing how easy/hard it will be do convert our JS back to AS.
> >
> > Thanks for working on it,
> > -Alex
> >
> >
>  		 	   		  

 		 	   		  

RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
> That’s convenient, but my main point was to reduce the number of
> databinding expressions in MXML that have to be written by the developer,
> and set up and run at startup.

Oh yeah, you are right, I didn't it read well, but still, usually for a library, even more a public one, I can pay a bit more to have something squared, the point is how much :-)

> Anyway, not a major issue for me at this time. I’m way more interested in
> seeing how easy/hard it will be do convert our JS back to AS.

yep !

Frédéric THOMAS


----------------------------------------
> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Tue, 11 Aug 2015 16:57:42 +0000
>
>
>
> On 8/11/15, 8:15 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>
>>>Also, another point I just remembered is MXML. I don’t know that
>>> MouseButton would actually show up in MXML attribute values but for
>>>other
>>> things it might be better to use simple String constants and do extra
>>> checking inside so your MXML looks like:
>>>
>>> <sometag someAttribute=“someValue” />
>>>
>>> Instead of
>>>
>>> <sometag someAttribute=“{SomeClass.someValue}” />
>>>
>>> Or
>>>
>>> <sometag someAttribute=“{new UtilityClass(‘someValue’))}”
>>>
>>> At least for now until someone figures out how to get the compiler to
>>> optimize out the binding expression. I’ve always wished we could do:
>>>
>>> <sometag someAttribute=“SomeClass.someConst” />
>>
>>In libraries, for the Enum like classes, I use to add things like
>>MyEnum.fromIndex(index:uint):MyEnum and
>>MyEnum.fromLabel(label:String):MyEnum, so, it can be used in the same way
>>than "new UtilityClass(‘someValue’))" but it belongs the same class where
>>the data resides.
>
> That’s convenient, but my main point was to reduce the number of
> databinding expressions in MXML that have to be written by the developer,
> and set up and run at startup.
>
> Anyway, not a major issue for me at this time. I’m way more interested in
> seeing how easy/hard it will be do convert our JS back to AS.
>
> Thanks for working on it,
> -Alex
>
>
 		 	   		  

Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.

On 8/11/15, 8:15 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>>Also, another point I just remembered is MXML. I don’t know that
>> MouseButton would actually show up in MXML attribute values but for
>>other
>> things it might be better to use simple String constants and do extra
>> checking inside so your MXML looks like:
>>
>> <sometag someAttribute=“someValue” />
>>
>> Instead of
>>
>> <sometag someAttribute=“{SomeClass.someValue}” />
>>
>> Or
>>
>> <sometag someAttribute=“{new UtilityClass(‘someValue’))}”
>>
>> At least for now until someone figures out how to get the compiler to
>> optimize out the binding expression. I’ve always wished we could do:
>>
>> <sometag someAttribute=“SomeClass.someConst” />
>
>In libraries, for the Enum like classes, I use to add things like
>MyEnum.fromIndex(index:uint):MyEnum and
>MyEnum.fromLabel(label:String):MyEnum, so, it can be used in the same way
>than "new UtilityClass(‘someValue’))" but it belongs the same class where
>the data resides.

That’s convenient, but my main point was to reduce the number of
databinding expressions in MXML that have to be written by the developer,
and set up and run at startup.

Anyway, not a major issue for me at this time.  I’m way more interested in
seeing how easy/hard it will be do convert our JS back to AS.

Thanks for working on it,
-Alex
 	   		  


RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
> I think the definition of consistent and safe might have some trade-offs.
> The resulting production code still needs to be small and fast so I tend
> to prefer solutions where you can remove development-time checking you
> don’t need I production.

I understand your point.

> Also, another point I just remembered is MXML. I don’t know that
> MouseButton would actually show up in MXML attribute values but for other
> things it might be better to use simple String constants and do extra
> checking inside so your MXML looks like:
>
> <sometag someAttribute=“someValue” />
>
> Instead of
>
> <sometag someAttribute=“{SomeClass.someValue}” />
>
> Or
>
> <sometag someAttribute=“{new UtilityClass(‘someValue’))}”
>
> At least for now until someone figures out how to get the compiler to
> optimize out the binding expression. I’ve always wished we could do:
>
> <sometag someAttribute=“SomeClass.someConst” />

In libraries, for the Enum like classes, I use to add things like MyEnum.fromIndex(index:uint):MyEnum and MyEnum.fromLabel(label:String):MyEnum, so, it can be used in the same way than "new UtilityClass(‘someValue’))" but it belongs the same class where the data resides.

> Generated code is not “source” so it won’t be in the source package or
> repo and thus doesn’t have to have a header, but we might want to add one
> anyway so it looks more official.

Ah yeah, correct !

Thanks,
Frédéric THOMAS


----------------------------------------
> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Tue, 11 Aug 2015 14:40:56 +0000
>
>
>
> On 8/11/15, 6:37 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>
>>> but no objection if that’s what folks want.
>>
>>My first reaction when it comes to a public, is to offer a consistent,
>>safe and clear API but I'm open to anything too.
>
> I think the definition of consistent and safe might have some trade-offs.
> The resulting production code still needs to be small and fast so I tend
> to prefer solutions where you can remove development-time checking you
> don’t need I production.
>
> Also, another point I just remembered is MXML. I don’t know that
> MouseButton would actually show up in MXML attribute values but for other
> things it might be better to use simple String constants and do extra
> checking inside so your MXML looks like:
>
> <sometag someAttribute=“someValue” />
>
> Instead of
>
> <sometag someAttribute=“{SomeClass.someValue}” />
>
> Or
>
> <sometag someAttribute=“{new UtilityClass(‘someValue’))}”
>
> At least for now until someone figures out how to get the compiler to
> optimize out the binding expression. I’ve always wished we could do:
>
> <sometag someAttribute=“SomeClass.someConst” />
>
>>
>>Btw, I noticed the package, class and Object.defineProperties comments
>>are not copied to the generated JS, so neither the Apache header, is that
>>an issue ?
>>
>>see: https://gist.github.com/doublefx/20b7949d3b9ff20daaa1
>
> Generated code is not “source” so it won’t be in the source package or
> repo and thus doesn’t have to have a header, but we might want to add one
> anyway so it looks more official.
>
> -Alex
>
 		 	   		  

Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.

On 8/11/15, 6:37 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>> but no objection if that’s what folks want.
>
>My first reaction when it comes to a public, is to offer a consistent,
>safe and clear API but I'm open to anything too.

I think the definition of consistent and safe might have some trade-offs.
The resulting production code still needs to be small and fast so I tend
to prefer solutions where you can remove development-time checking you
don’t need I production.

Also, another point I just remembered is MXML.  I don’t know that
MouseButton would actually show up in MXML attribute values but for other
things it might be better to use simple String constants and do extra
checking inside so your MXML looks like:

<sometag someAttribute=“someValue” />

Instead of

<sometag someAttribute=“{SomeClass.someValue}” />

Or

<sometag someAttribute=“{new UtilityClass(‘someValue’))}”

At least for now until someone figures out how to get the compiler to
optimize out the binding expression.  I’ve always wished we could do:

<sometag someAttribute=“SomeClass.someConst” />

>
>Btw, I noticed the package, class and Object.defineProperties comments
>are not copied to the generated JS, so neither the Apache header, is that
>an issue ?
>
>see: https://gist.github.com/doublefx/20b7949d3b9ff20daaa1

Generated code is not “source” so it won’t be in the source package or
repo and thus doesn’t have to have a header, but we might want to add one
anyway so it looks more official.

-Alex


RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
> but no objection if that’s what folks want.

My first reaction when it comes to a public, is to offer a consistent, safe and clear API but I'm open to anything too.

Btw, I noticed the package, class and Object.defineProperties comments are not copied to the generated JS, so neither the Apache header, is that an issue ?

see: https://gist.github.com/doublefx/20b7949d3b9ff20daaa1


Frédéric THOMAS


----------------------------------------
> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Tue, 11 Aug 2015 13:25:35 +0000
>
>
>
> On 8/11/15, 6:06 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>
>>> Makes sense. I was just wondering why a MouseButton class is needed at
>>> all and not just a plain String constant.
>>
>>Maybe is not, but I added, maybe I shouldn't had, isButton(button) =>
>>boolean which tests to see which button was pressed during the event, the
>>type of button is goog.events.BrowserEvent.MouseButton which is declared
>>as enum in goog.events.BrowserEvent:
>>
>>/**
>> * Normalized button constants for the mouse.
>> * @enum {number}
>> */
>>goog.events.BrowserEvent.MouseButton = {
>> LEFT: 0,
>> MIDDLE: 1,
>> RIGHT: 2
>>};
>>
>>The closer things I know to match the package and look close to enum is
>>the code I shown (well, I could have prevented the constructor to be
>>called to be closer).
>>
>>The other solution would have been to let the developer fill the
>>parameter with a uint or a constant but given that's a public API which
>>is a wrapper to another public one, it seems to me it should be protected
>>against bad values and should match as much as possible the google doc
>>found for the wrapped class, I could be wrong to do that way though, that
>>what why I asked before to continue this way for other classes which is
>>btw more time consuming.
>
> IMO, it would cause too much code bloat and take too much time to try to
> protect inputs against bad values by adding classes like this. In my
> vision for FlexJS, we might produce debug-time beads that have extra
> checking of uints and strings done at the start of the method. In theory,
> if you have tested your code before deploying, the production version
> shouldn’t need this checking or extra class definitions. What is more
> important to me right now is that we get just enough functionality to
> allow customers to produce something useful. Folks did just fine with
> current Flex not checking parameters, so I wouldn’t spend too much time on
> something like this, but no objection if that’s what folks want.
>
> -Alex
>
 		 	   		  

Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.

On 8/11/15, 6:06 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>> Makes sense. I was just wondering why a MouseButton class is needed at
>> all and not just a plain String constant.
>
>Maybe is not, but I added, maybe I shouldn't had, isButton(button) =>
>boolean which tests to see which button was pressed during the event, the
>type of button is goog.events.BrowserEvent.MouseButton which is declared
>as enum in goog.events.BrowserEvent:
>
>/**
> * Normalized button constants for the mouse.
> * @enum {number}
> */
>goog.events.BrowserEvent.MouseButton = {
>  LEFT: 0,
>  MIDDLE: 1,
>  RIGHT: 2
>};
>
>The closer things I know to match the package and look close to enum is
>the code I shown (well, I could have prevented the constructor to be
>called to be closer).
>
>The other solution would have been to let the developer fill the
>parameter with a uint or a constant but given that's a public API which
>is a wrapper to another public one, it seems to me it should be protected
>against bad values and should match as much as possible the google doc
>found for the wrapped class, I could be wrong to do that way though, that
>what why I asked before to continue this way for other classes which is
>btw more time consuming.

IMO, it would cause too much code bloat and take too much time to try to
protect inputs against bad values by adding classes like this.  In my
vision for FlexJS, we might produce debug-time beads that have extra
checking of uints and strings done at the start of the method.  In theory,
if you have tested your code before deploying, the production version
shouldn’t need this checking or extra class definitions.  What is more
important to me right now is that we get just enough functionality to
allow customers to produce something useful.  Folks did just fine with
current Flex not checking parameters, so I wouldn’t spend too much time on
something like this, but no objection if that’s what folks want.

-Alex


RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
> Makes sense. I was just wondering why a MouseButton class is needed at
> all and not just a plain String constant.

Maybe is not, but I added, maybe I shouldn't had, isButton(button) => boolean which tests to see which button was pressed during the event, the type of button is goog.events.BrowserEvent.MouseButton which is declared as enum in goog.events.BrowserEvent:

/**
 * Normalized button constants for the mouse.
 * @enum {number}
 */
goog.events.BrowserEvent.MouseButton = {
  LEFT: 0,
  MIDDLE: 1,
  RIGHT: 2
};

The closer things I know to match the package and look close to enum is the code I shown (well, I could have prevented the constructor to be called to be closer).

The other solution would have been to let the developer fill the parameter with a uint or a constant but given that's a public API which is a wrapper to another public one, it seems to me it should be protected against bad values and should match as much as possible the google doc found for the wrapped class, I could be wrong to do that way though, that what why I asked before to continue this way for other classes which is btw more time consuming.

Frédéric THOMAS


----------------------------------------
> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Tue, 11 Aug 2015 12:49:35 +0000
>
>
>
> On 8/11/15, 5:22 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>
>
>>> What is the advantage of doing it this way?
>>
>>My point in migrating the framework is also to figure out how a framework
>>developer would feel comfortable working with, using and developing new
>>component seeing how the others are developed, for example, even though
>>this class is emitted in JS only, it is now coded in AS, except of the
>>comments I added to this class which is a wrapper to the
>>goog.events.BrowserEvent, if he needs to use it, the developer will
>>probably look at the google doc too and I guess, expect to have as close
>>as possible the same API.
>>
>>Well, at least I did this assumption and was wondering if it wasn't to
>>much.
>
> Makes sense. I was just wondering why a MouseButton class is needed at
> all and not just a plain String constant.
>
> -Alex
>
>
 		 	   		  

Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.

On 8/11/15, 5:22 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:


>> What is the advantage of doing it this way?
>
>My point in migrating the framework is also to figure out how a framework
>developer would feel comfortable working with, using and developing new
>component seeing how the others are developed, for example, even though
>this class is emitted in JS only, it is now coded in AS, except of the
>comments I added to this class which is a wrapper to the
>goog.events.BrowserEvent, if he needs to use it, the developer will
>probably look at the google doc too and I guess, expect to have as close
>as possible the same API.
>
>Well, at least I did this assumption and was wondering if it wasn't to
>much.

Makes sense.  I was just wondering why a MouseButton class is needed at
all and not just a plain String constant.

-Alex
	 	   		  


RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
> Well, try running ‘ant main’, then in examples/DataBindingTest run Ant
> again and see if you get any errors or warnings. Maybe something changed
> so that isn’t needed anymore. You might just want to use a new
> compile-js-config.xml file.

Until Core is not totally migrated, that won't be possible.

I've seen in core/asjs, the default.css but haven't seen where it is used.

> What is the advantage of doing it this way?

My point in migrating the framework is also to figure out how a framework developer would feel comfortable working with, using and developing new component seeing how the others are developed, for example, even though this class is emitted in JS only, it is now coded in AS, except of the comments I added to this class which is a wrapper to the goog.events.BrowserEvent, if he needs to use it, the developer will probably look at the google doc too and I guess, expect to have as close as possible the same API.

Well, at least I did this assumption and was wondering if it wasn't to much.

Frédéric THOMAS


----------------------------------------
> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Tue, 11 Aug 2015 06:37:13 +0000
>
>
>
> On 8/10/15, 11:05 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>
>>I even removed the entire <library-path> section and I've have no
>>compilation errors and the core tests passes, is that enough to ensure it
>>can be safely removed ?
>
> Well, try running ‘ant main’, then in examples/DataBindingTest run Ant
> again and see if you get any errors or warnings. Maybe something changed
> so that isn’t needed anymore. You might just want to use a new
> compile-js-config.xml file.
>
>>
>>Another thing, I see that in BrowserEvent.js
>>
>>/**
>> * @type {?goog.events.BrowserEvent}
>> */
>>org.apache.flex.events.BrowserEvent.prototype.wrappedEvent = null;
>>
>>There is no extern definition for the GCL, I type those as Object, is it
>>fine ?
>
> That file contains some dirty hacks, maybe we just won’t cross-compile it.
>
>>
>>I added some missing potentially other properties and functions to this
>>class, one of them required an enum, instead, I did like that:
>>
>>package org.apache.flex.core.BrowserEvent {
>>
>>COMPILE::AS3
>>internal class MouseButton {}
>>
>>COMPILE::JS
>>public class MouseButton {
>> public static const LEFT:MouseButton = new MouseButton(0, "LEFT");
>> public static const MIDDLE:MouseButton = new MouseButton(1, "MIDDLE");
>> public static const RIGHT:MouseButton = new MouseButton(2, "RIGHT");
>>
>> private var _index:uint;
>> private var _name:String;
>>
>> public function MouseButton(index:uint, name:String):void {
>> _index = index;
>> _name = name;
>>
>> }
>>
>> public function get index():uint {
>> return _index;
>> }
>>
>> public function get name():String {
>> return _name;
>> }
>>}
>>}
>>
>>
>>Is it ok or it is overkilling ?
>
> What is the advantage of doing it this way?
>
> Thanks for working on this,
> Alex
>
>
 		 	   		  

Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.

On 8/10/15, 11:05 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>I even removed the entire <library-path> section and I've have no
>compilation errors and the core tests passes, is that enough to ensure it
>can be safely removed ?

Well, try running ‘ant main’, then in examples/DataBindingTest run Ant
again and see if you get any errors or warnings.  Maybe something changed
so that isn’t needed anymore.  You might just want to use a new
compile-js-config.xml file.

>
>Another thing, I see that in BrowserEvent.js
>
>/**
> * @type {?goog.events.BrowserEvent}
> */
>org.apache.flex.events.BrowserEvent.prototype.wrappedEvent = null;
>
>There is no extern definition for the GCL, I type those as Object, is it
>fine ?

That file contains some dirty hacks, maybe we just won’t cross-compile it.

>
>I added some missing potentially other properties and functions to this
>class, one of them required an enum, instead, I did like that:
>
>package org.apache.flex.core.BrowserEvent {
>
>COMPILE::AS3
>internal class MouseButton {}
>
>COMPILE::JS
>public class MouseButton {
>    public static const LEFT:MouseButton = new MouseButton(0, "LEFT");
>    public static const MIDDLE:MouseButton = new MouseButton(1, "MIDDLE");
>    public static const RIGHT:MouseButton = new MouseButton(2, "RIGHT");
>
>    private var _index:uint;
>    private var _name:String;
>
>    public function MouseButton(index:uint, name:String):void {
>        _index = index;
>        _name = name;
>
>    }
>
>    public function get index():uint {
>        return _index;
>    }
>
>    public function get name():String {
>        return _name;
>    }
>}
>}
>
>
>Is it ok or it is overkilling ?

What is the advantage of doing it this way?

Thanks for working on this,
Alex
		 	   		  


Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.

On 8/11/15, 5:31 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:


>Btw, I can now produce the Core.swc filled with the compiled AS3 classes
>and the JS in a once and in IntelliJ, indeed, I only migrated 1 JS file
>to AS but it is what I wanted first, validate I can do it, so, I will
>continue on it.

Awesome!

-Alex
	 	   		  


RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
> No idea. You did remind me that I never finished investigating whether
> there was a valid AS3 syntax for disambiguating a class without a package
> and a class with a package. Maybe the best thing for you right now is to
> not worry about the conflict and see if there are other issues? Or does
> this issue block you somehow?

Actually, I've been to far, it was enough to filter the (external-) / library-path when set, taking care the new config var was set first.
I will probably have to add this new config var to the ant conf too.

Btw, I can now produce the Core.swc filled with the compiled AS3 classes and the JS in a once and in IntelliJ, indeed, I only migrated 1 JS file to AS but it is what I wanted first, validate I can do it, so, I will continue on it.

Frédéric THOMAS


----------------------------------------
> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Tue, 11 Aug 2015 06:25:19 +0000
>
>
>
> On 8/10/15, 6:19 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>
>>I'm trying now to compile the AS files in conditional compilation with
>>COMPILE::AS3, because the first phase of the compilation is COMPILE::JS,
>>I have JS.swc in my library-path.
>>
>>I was aware that some conflicts could occur for example the Event class,
>>so I had the idea to introduce a new configuration variable
>>"exclude-native-js-libraries" that the compiler client set to true when
>>is in phase to COMPILE::AS3, the idea behind was to allow me, after the
>>configuration merge, at configuration validation time, to remove the
>>Native JS libraries (externs) from the list of library-path and
>>external-library-path, at the moment, I check the path contains "js/libs"
>>only, it is to be improved.
>>
>>The code bellow shows how I do and when I inspect the ConfigurationBuffer
>>at the end of the method, the JS.swc is removed as expected, the problem
>>is that I still had some AmbiguousDefinition, after a bit of debug,
>>checking at the scope file, I've seen one of them was in the JS.swc, it
>>was included despite I removed it from the merged ConfigurationBuffer.
>>
>>What did I miss ?
>
> No idea. You did remind me that I never finished investigating whether
> there was a valid AS3 syntax for disambiguating a class without a package
> and a class with a package. Maybe the best thing for you right now is to
> not worry about the conflict and see if there are other issues? Or does
> this issue block you somehow?
>
> -Alex
>
 		 	   		  

Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.

On 8/10/15, 6:19 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>I'm trying now to compile the AS files in conditional compilation with
>COMPILE::AS3, because the first phase of the compilation is COMPILE::JS,
>I have JS.swc in my library-path.
>
>I was aware that some conflicts could occur for example the Event class,
>so I had the idea to introduce a new configuration variable
>"exclude-native-js-libraries" that the compiler client set to true when
>is in phase to COMPILE::AS3, the idea behind was to allow me, after the
>configuration merge, at configuration validation time, to remove the
>Native JS libraries (externs) from the list of library-path and
>external-library-path, at the moment, I check the path contains "js/libs"
>only, it is to be improved.
>
>The code bellow shows how I do and when I inspect the ConfigurationBuffer
>at the end of the method, the JS.swc is removed as expected, the problem
>is that I still had some AmbiguousDefinition, after a bit of debug,
>checking at the scope file, I've seen one of them was in the JS.swc, it
>was included despite I removed it from the merged ConfigurationBuffer.
>
>What did I miss ?

No idea.  You did remind me that I never finished investigating whether
there was a valid AS3 syntax for disambiguating a class without a package
and a class with a package.  Maybe the best thing for you right now is to
not worry about the conflict and see if there are other issues?  Or does
this issue block you somehow?

-Alex	 	   		  


RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
I'm trying now to compile the AS files in conditional compilation with COMPILE::AS3, because the first phase of the compilation is COMPILE::JS, I have JS.swc in my library-path.

I was aware that some conflicts could occur for example the Event class, so I had the idea to introduce a new configuration variable "exclude-native-js-libraries" that the compiler client set to true when is in phase to COMPILE::AS3, the idea behind was to allow me, after the configuration merge, at configuration validation time, to remove the Native JS libraries (externs) from the list of library-path and external-library-path, at the moment, I check the path contains "js/libs" only, it is to be improved.

The code bellow shows how I do and when I inspect the ConfigurationBuffer at the end of the method, the JS.swc is removed as expected, the problem is that I still had some AmbiguousDefinition, after a bit of debug, checking at the scope file, I've seen one of them was in the JS.swc, it was included despite I removed it from the merged ConfigurationBuffer.

What did I miss ?

/**
     * Validate configuration options values.
     * 
     * @param configurationBuffer Configuration buffer.
     * @throws ConfigurationException Error.
     */
    public void validate(ConfigurationBuffer configurationBuffer) throws ConfigurationException
    {
        // process the merged configuration buffer. right, can't just process the args.
        processDeprecatedAndRemovedOptions(configurationBuffer);

        removeNativeJSLibrariesIfNeeded(configurationBuffer, "compiler.library-path");
        removeNativeJSLibrariesIfNeeded(configurationBuffer, "compiler.external-library-path");

        validateDumpConfig(configurationBuffer);
    }

    private void removeNativeJSLibrariesIfNeeded(ConfigurationBuffer buffer, String libraryPathVariable)
            throws ConfigurationException
    {

        boolean excludeNativeJS = false;
        try
        {
            final String configurationVar = buffer.peekSimpleConfigurationVar("exclude-native-js-libraries");

            if (configurationVar != null)
            {
                excludeNativeJS = configurationVar.equals(Boolean.TRUE.toString());
            }
        }
        catch (ConfigurationException ignored)
        {
        }

        if (excludeNativeJS)
        {
            List<ConfigurationValue> libPaths = null;
            try {
                libPaths = buffer.peekConfigurationVar(libraryPathVariable);
            } catch (ConfigurationException ignored) {
            }

            if (libPaths != null) {
                final ConfigurationValue configurationValue = libPaths.get(0);
                final List<String> paths = configurationValue.getArgs();

                Iterator<String> pathIterator = paths.iterator();

                while (pathIterator.hasNext())
                {
                    final String path = pathIterator.next();
                    final boolean isNativeJS = path.contains("js/libs");

                    if (isNativeJS)
                    {
                        pathIterator.remove();
                    }
                }

                buffer.setVar(libraryPathVariable, paths, configurationValue.getSource() + ".updated", configurationValue.getLine());
            }
        }
    }



Frédéric THOMAS


----------------------------------------
> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Mon, 10 Aug 2015 19:05:54 +0100
>
> I even removed the entire <library-path> section and I've have no compilation errors and the core tests passes, is that enough to ensure it can be safely removed ?
>
> Another thing, I see that in BrowserEvent.js
>
> /**
> * @type {?goog.events.BrowserEvent}
> */
> org.apache.flex.events.BrowserEvent.prototype.wrappedEvent = null;
>
> There is no extern definition for the GCL, I type those as Object, is it fine ?
>
> Except of that, after some tweaking, BrowserEvent.as cross compiles and I have the @exports back, it was probably due to some config problem when trying to compile both AS3 / JS.
>
> I added some missing potentially other properties and functions to this class, one of them required an enum, instead, I did like that:
>
> package org.apache.flex.core.BrowserEvent {
>
> COMPILE::AS3
> internal class MouseButton {}
>
> COMPILE::JS
> public class MouseButton {
>     public static const LEFT:MouseButton = new MouseButton(0, "LEFT");
>     public static const MIDDLE:MouseButton = new MouseButton(1, "MIDDLE");
>     public static const RIGHT:MouseButton = new MouseButton(2, "RIGHT");
>
>     private var _index:uint;
>     private var _name:String;
>
>     public function MouseButton(index:uint, name:String):void {
>         _index = index;
>         _name = name;
>
>     }
>
>     public function get index():uint {
>         return _index;
>     }
>
>     public function get name():String {
>         return _name;
>     }
> }
> }
>
>
> Is it ok or it is overkilling ?
>
> As you can noticed, I had to create an empty AS3 internal class otherwise the sources are not found for the COMPILE::JS only classes.
>
> Frédéric THOMAS
>
>
> ----------------------------------------
>> From: aharui@adobe.com
>> To: dev@flex.apache.org
>> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
>> Date: Mon, 10 Aug 2015 13:07:35 +0000
>>
>> Hmm, might be a copy/paste error. Try removing HTML and Charts and see if
>> you get an error.
>>
>> -Alex
>>
>> On 8/10/15, 5:57 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>>
>>>Hi Alex,
>>>
>>>I don't understand why we have that in
>>>frameworks\projects\Core\compile-asjs-config.xml
>>>
>>><library-path>
>>>
>>> <path-element>../../libs/Core.swc</path-element>
>>> <path-element>../../libs/Graphics.swc</path-element>
>>> <path-element>../../libs/HTML.swc</path-element>
>>> <path-element>../../libs/Charts.swc</path-element>
>>></library-path>
>>>
>>>It looks like circular dependency, could you explain ?
>>>
>>>Thanks,
>>>Frédéric THOMAS
>>>
>>>
>>>----------------------------------------
>>>> From: webdoublefx@hotmail.com
>>>> To: dev@flex.apache.org
>>>> Subject: RE: Re : Re: [FlexJS] Framework using externs (was: Setup
>>>>Error)
>>>> Date: Sun, 9 Aug 2015 16:42:19 +0100
>>>>
>>>>> If that's the core swc then that's a mistake. Svg manifest should be
>>>>>in html project
>>>>
>>>> Ok, thanks, will start migrating JS to AS in my next session.
>>>>
>>>> Frédéric THOMAS
>>>>
>>>>
>>>> ----------------------------------------
>>>>> From: aharui@adobe.com
>>>>> To: webdoublefx@hotmail.com; dev@flex.apache.org
>>>>> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup
>>>>>Error)
>>>>> Date: Sun, 9 Aug 2015 15:32:41 +0000
>>>>>
>>>>> If that's the core swc then that's a mistake. Svg manifest should be
>>>>>in html project
>>>>>
>>>>>
>>>>> Sent from my LG G3, an AT&T 4G LTE smartphone
>>>>>
>>>>>
>>>>> ------ Original message------
>>>>>
>>>>> From: Frédéric THOMAS
>>>>>
>>>>> Date: Sun, Aug 9, 2015 8:16 AM
>>>>>
>>>>> To: dev@flex.apache.org;
>>>>>
>>>>> Subject:RE: Re : Re: [FlexJS] Framework using externs (was: Setup
>>>>>Error)
>>>>>
>>>>>
>>>>> @Alex,
>>>>>
>>>>> Except of the @export, I've got an issue with:
>>>>>
>>>>> <include-namespaces>
>>>>> <uri>library://ns.apache.org/flexjs/basic</uri>
>>>>> <uri>library://ns.apache.org/flexjs/svg</uri>
>>>>> </include-namespaces>
>>>>>
>>>>>
>>>>> TextButton is not found in library://ns.apache.org/flexjs/svg, where
>>>>>is the manifest ? I'm a bit confuse here.
>>>>>
>>>>> If I remove it from include-namespace, I can now compile Core in
>>>>>IntelliJ with only one build configuration, it generates all the JS and
>>>>>the SWC in a once, not sure it is a valid SWC yet given I had to remove
>>>>>this namespace, in more I didn't migrate the JS to AS yet, I copy them
>>>>>into the SWC at the moment but my other test project tells me that I'm
>>>>>on the right way because it uses conditional compilation and I can
>>>>>generate the JS and SWC in a once too and it works.
>>>>>
>>>>> Frédéric THOMAS
>>>>>
>>>>>
>>>>> ----------------------------------------
>>>>>> Date: Sun, 9 Aug 2015 12:28:51 +0100
>>>>>> Subject: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
>>>>>> From: webdoublefx@hotmail.com
>>>>>> To: dev@flex.apache.org
>>>>>>
>>>>>> That's that Mike.
>>>>>> I don't use the externc.
>>>>>>
>>>>>> --- Message initial ---
>>>>>>
>>>>>> De : "Michael Schmalle" <te...@gmail.com>
>>>>>> Envoyé : 9 août 2015 11:59
>>>>>> A : dev@flex.apache.org
>>>>>> Objet : Re: [FlexJS] Framework using externs (was: Setup Error)
>>>>>>
>>>>>> On Sun, Aug 9, 2015 at 1:06 AM, Alex Harui <ah...@adobe.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 8/8/15, 12:38 PM, "Michael Schmalle" <te...@gmail.com>
>>>>>>>wrote:
>>>>>>>
>>>>>>>>On Sat, Aug 8, 2015 at 1:39 PM, Frédéric THOMAS
>>>>>>>><we...@hotmail.com>
>>>>>>>>wrote:
>>>>>>>>
>>>>>>>>> Also, What to do to keep as doc, I've been trying -keep-asdoc but
>>>>>>>>>
>>>>>>>>>
>>>>>>>>Fred, I looked at the code quickly, this should work right now and
>>>>>>>>-keep-asdoc is ONLY for the @param description etc.
>>>>>>>
>>>>>>> It is supposed to grab all of the asdoc from the AS and append to the
>>>>>>> JSDoc. It sounds like the JSDoc emitter isn’t wired up correctly,
>>>>>>>and it
>>>>>>> is possible that the asdoc delegate is no longer configured
>>>>>>>correctly for
>>>>>>> externs.
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>>
>>>>>> What is this thread actually about, I was aware of what was being
>>>>>>copied
>>>>>> but I thought this was about porting FlexJS .js code to AS classes.
>>>>>>
>>>>>> Is Fred making extern files for FlexJS code? If he is porting, then
>>>>>>he is
>>>>>> using the FlexJS emitter, I didn't do anything weird, is he using the
>>>>>>JSC
>>>>>> compiler?
>>>>>>
>>>>>> Mike
>>>>>
>>>>
>>>
>>
>
 		 	   		  

RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
I even removed the entire <library-path> section and I've have no compilation errors and the core tests passes, is that enough to ensure it can be safely removed ?

Another thing, I see that in BrowserEvent.js

/**
 * @type {?goog.events.BrowserEvent}
 */
org.apache.flex.events.BrowserEvent.prototype.wrappedEvent = null;

There is no extern definition for the GCL, I type those as Object, is it fine ?

Except of that, after some tweaking, BrowserEvent.as cross compiles and I have the @exports back, it was probably due to some config problem when trying to compile both AS3 / JS.

I added some missing potentially other properties and functions to this class, one of them required an enum, instead, I did like that:

package org.apache.flex.core.BrowserEvent {

COMPILE::AS3
internal class MouseButton {}

COMPILE::JS
public class MouseButton {
    public static const LEFT:MouseButton = new MouseButton(0, "LEFT");
    public static const MIDDLE:MouseButton = new MouseButton(1, "MIDDLE");
    public static const RIGHT:MouseButton = new MouseButton(2, "RIGHT");

    private var _index:uint;
    private var _name:String;

    public function MouseButton(index:uint, name:String):void {
        _index = index;
        _name = name;

    }

    public function get index():uint {
        return _index;
    }

    public function get name():String {
        return _name;
    }
}
}


Is it ok or it is overkilling ?

As you can noticed, I had to create an empty AS3 internal class otherwise the sources are not found for the COMPILE::JS only classes.

Frédéric THOMAS


----------------------------------------
> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Mon, 10 Aug 2015 13:07:35 +0000
>
> Hmm, might be a copy/paste error. Try removing HTML and Charts and see if
> you get an error.
>
> -Alex
>
> On 8/10/15, 5:57 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>
>>Hi Alex,
>>
>>I don't understand why we have that in
>>frameworks\projects\Core\compile-asjs-config.xml
>>
>><library-path>
>>
>> <path-element>../../libs/Core.swc</path-element>
>> <path-element>../../libs/Graphics.swc</path-element>
>> <path-element>../../libs/HTML.swc</path-element>
>> <path-element>../../libs/Charts.swc</path-element>
>></library-path>
>>
>>It looks like circular dependency, could you explain ?
>>
>>Thanks,
>>Frédéric THOMAS
>>
>>
>>----------------------------------------
>>> From: webdoublefx@hotmail.com
>>> To: dev@flex.apache.org
>>> Subject: RE: Re : Re: [FlexJS] Framework using externs (was: Setup
>>>Error)
>>> Date: Sun, 9 Aug 2015 16:42:19 +0100
>>>
>>>> If that's the core swc then that's a mistake. Svg manifest should be
>>>>in html project
>>>
>>> Ok, thanks, will start migrating JS to AS in my next session.
>>>
>>> Frédéric THOMAS
>>>
>>>
>>> ----------------------------------------
>>>> From: aharui@adobe.com
>>>> To: webdoublefx@hotmail.com; dev@flex.apache.org
>>>> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup
>>>>Error)
>>>> Date: Sun, 9 Aug 2015 15:32:41 +0000
>>>>
>>>> If that's the core swc then that's a mistake. Svg manifest should be
>>>>in html project
>>>>
>>>>
>>>> Sent from my LG G3, an AT&T 4G LTE smartphone
>>>>
>>>>
>>>> ------ Original message------
>>>>
>>>> From: Frédéric THOMAS
>>>>
>>>> Date: Sun, Aug 9, 2015 8:16 AM
>>>>
>>>> To: dev@flex.apache.org;
>>>>
>>>> Subject:RE: Re : Re: [FlexJS] Framework using externs (was: Setup
>>>>Error)
>>>>
>>>>
>>>> @Alex,
>>>>
>>>> Except of the @export, I've got an issue with:
>>>>
>>>> <include-namespaces>
>>>> <uri>library://ns.apache.org/flexjs/basic</uri>
>>>> <uri>library://ns.apache.org/flexjs/svg</uri>
>>>> </include-namespaces>
>>>>
>>>>
>>>> TextButton is not found in library://ns.apache.org/flexjs/svg, where
>>>>is the manifest ? I'm a bit confuse here.
>>>>
>>>> If I remove it from include-namespace, I can now compile Core in
>>>>IntelliJ with only one build configuration, it generates all the JS and
>>>>the SWC in a once, not sure it is a valid SWC yet given I had to remove
>>>>this namespace, in more I didn't migrate the JS to AS yet, I copy them
>>>>into the SWC at the moment but my other test project tells me that I'm
>>>>on the right way because it uses conditional compilation and I can
>>>>generate the JS and SWC in a once too and it works.
>>>>
>>>> Frédéric THOMAS
>>>>
>>>>
>>>> ----------------------------------------
>>>>> Date: Sun, 9 Aug 2015 12:28:51 +0100
>>>>> Subject: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
>>>>> From: webdoublefx@hotmail.com
>>>>> To: dev@flex.apache.org
>>>>>
>>>>> That's that Mike.
>>>>> I don't use the externc.
>>>>>
>>>>> --- Message initial ---
>>>>>
>>>>> De : "Michael Schmalle" <te...@gmail.com>
>>>>> Envoyé : 9 août 2015 11:59
>>>>> A : dev@flex.apache.org
>>>>> Objet : Re: [FlexJS] Framework using externs (was: Setup Error)
>>>>>
>>>>> On Sun, Aug 9, 2015 at 1:06 AM, Alex Harui <ah...@adobe.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On 8/8/15, 12:38 PM, "Michael Schmalle" <te...@gmail.com>
>>>>>>wrote:
>>>>>>
>>>>>>>On Sat, Aug 8, 2015 at 1:39 PM, Frédéric THOMAS
>>>>>>><we...@hotmail.com>
>>>>>>>wrote:
>>>>>>>
>>>>>>>> Also, What to do to keep as doc, I've been trying -keep-asdoc but
>>>>>>>>
>>>>>>>>
>>>>>>>Fred, I looked at the code quickly, this should work right now and
>>>>>>>-keep-asdoc is ONLY for the @param description etc.
>>>>>>
>>>>>> It is supposed to grab all of the asdoc from the AS and append to the
>>>>>> JSDoc. It sounds like the JSDoc emitter isn’t wired up correctly,
>>>>>>and it
>>>>>> is possible that the asdoc delegate is no longer configured
>>>>>>correctly for
>>>>>> externs.
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>>
>>>>> What is this thread actually about, I was aware of what was being
>>>>>copied
>>>>> but I thought this was about porting FlexJS .js code to AS classes.
>>>>>
>>>>> Is Fred making extern files for FlexJS code? If he is porting, then
>>>>>he is
>>>>> using the FlexJS emitter, I didn't do anything weird, is he using the
>>>>>JSC
>>>>> compiler?
>>>>>
>>>>> Mike
>>>>
>>>
>>
>
 		 	   		  

Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.
Hmm, might be a copy/paste error.  Try removing HTML and Charts and see if
you get an error.

-Alex

On 8/10/15, 5:57 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>Hi Alex,
>
>I don't understand why we have that in
>frameworks\projects\Core\compile-asjs-config.xml
>
><library-path>
>    <!-- compjsc won't 'link' these classes in, but will list their
>requires
>     if these swcs are on the external-library-path then their requires
>     will not be listed -->
>    <path-element>../../libs/Core.swc</path-element>
>    <path-element>../../libs/Graphics.swc</path-element>
>    <path-element>../../libs/HTML.swc</path-element>
>    <path-element>../../libs/Charts.swc</path-element>
></library-path>
>
>It looks like circular dependency, could you explain ?
>
>Thanks,
>Frédéric THOMAS
>
>
>----------------------------------------
>> From: webdoublefx@hotmail.com
>> To: dev@flex.apache.org
>> Subject: RE: Re : Re: [FlexJS] Framework using externs (was: Setup
>>Error)
>> Date: Sun, 9 Aug 2015 16:42:19 +0100
>>
>>> If that's the core swc then that's a mistake. Svg manifest should be
>>>in html project
>>
>> Ok, thanks, will start migrating JS to AS in my next session.
>>
>> Frédéric THOMAS
>>
>>
>> ----------------------------------------
>>> From: aharui@adobe.com
>>> To: webdoublefx@hotmail.com; dev@flex.apache.org
>>> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup
>>>Error)
>>> Date: Sun, 9 Aug 2015 15:32:41 +0000
>>>
>>> If that's the core swc then that's a mistake. Svg manifest should be
>>>in html project
>>>
>>>
>>> Sent from my LG G3, an AT&T 4G LTE smartphone
>>>
>>>
>>> ------ Original message------
>>>
>>> From: Frédéric THOMAS
>>>
>>> Date: Sun, Aug 9, 2015 8:16 AM
>>>
>>> To: dev@flex.apache.org;
>>>
>>> Subject:RE: Re : Re: [FlexJS] Framework using externs (was: Setup
>>>Error)
>>>
>>>
>>> @Alex,
>>>
>>> Except of the @export, I've got an issue with:
>>>
>>> <include-namespaces>
>>> <uri>library://ns.apache.org/flexjs/basic</uri>
>>> <uri>library://ns.apache.org/flexjs/svg</uri>
>>> </include-namespaces>
>>>
>>>
>>> TextButton is not found in library://ns.apache.org/flexjs/svg, where
>>>is the manifest ? I'm a bit confuse here.
>>>
>>> If I remove it from include-namespace, I can now compile Core in
>>>IntelliJ with only one build configuration, it generates all the JS and
>>>the SWC in a once, not sure it is a valid SWC yet given I had to remove
>>>this namespace, in more I didn't migrate the JS to AS yet, I copy them
>>>into the SWC at the moment but my other test project tells me that I'm
>>>on the right way because it uses conditional compilation and I can
>>>generate the JS and SWC in a once too and it works.
>>>
>>> Frédéric THOMAS
>>>
>>>
>>> ----------------------------------------
>>>> Date: Sun, 9 Aug 2015 12:28:51 +0100
>>>> Subject: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
>>>> From: webdoublefx@hotmail.com
>>>> To: dev@flex.apache.org
>>>>
>>>> That's that Mike.
>>>> I don't use the externc.
>>>>
>>>> --- Message initial ---
>>>>
>>>> De : "Michael Schmalle" <te...@gmail.com>
>>>> Envoyé : 9 août 2015 11:59
>>>> A : dev@flex.apache.org
>>>> Objet : Re: [FlexJS] Framework using externs (was: Setup Error)
>>>>
>>>> On Sun, Aug 9, 2015 at 1:06 AM, Alex Harui <ah...@adobe.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On 8/8/15, 12:38 PM, "Michael Schmalle" <te...@gmail.com>
>>>>>wrote:
>>>>>
>>>>>>On Sat, Aug 8, 2015 at 1:39 PM, Frédéric THOMAS
>>>>>><we...@hotmail.com>
>>>>>>wrote:
>>>>>>
>>>>>>> Also, What to do to keep as doc, I've been trying -keep-asdoc but
>>>>>>>
>>>>>>>
>>>>>>Fred, I looked at the code quickly, this should work right now and
>>>>>>-keep-asdoc is ONLY for the @param description etc.
>>>>>
>>>>> It is supposed to grab all of the asdoc from the AS and append to the
>>>>> JSDoc. It sounds like the JSDoc emitter isn’t wired up correctly,
>>>>>and it
>>>>> is possible that the asdoc delegate is no longer configured
>>>>>correctly for
>>>>> externs.
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>> What is this thread actually about, I was aware of what was being
>>>>copied
>>>> but I thought this was about porting FlexJS .js code to AS classes.
>>>>
>>>> Is Fred making extern files for FlexJS code? If he is porting, then
>>>>he is
>>>> using the FlexJS emitter, I didn't do anything weird, is he using the
>>>>JSC
>>>> compiler?
>>>>
>>>> Mike
>>>
>>
> 		 	   		  


RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
Hi Alex,

I don't understand why we have that in frameworks\projects\Core\compile-asjs-config.xml

<library-path>
    <!-- compjsc won't 'link' these classes in, but will list their requires
     if these swcs are on the external-library-path then their requires
     will not be listed -->
    <path-element>../../libs/Core.swc</path-element>
    <path-element>../../libs/Graphics.swc</path-element>
    <path-element>../../libs/HTML.swc</path-element>
    <path-element>../../libs/Charts.swc</path-element>
</library-path>

It looks like circular dependency, could you explain ?

Thanks,
Frédéric THOMAS


----------------------------------------
> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Sun, 9 Aug 2015 16:42:19 +0100
>
>> If that's the core swc then that's a mistake. Svg manifest should be in html project
>
> Ok, thanks, will start migrating JS to AS in my next session.
>
> Frédéric THOMAS
>
>
> ----------------------------------------
>> From: aharui@adobe.com
>> To: webdoublefx@hotmail.com; dev@flex.apache.org
>> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
>> Date: Sun, 9 Aug 2015 15:32:41 +0000
>>
>> If that's the core swc then that's a mistake. Svg manifest should be in html project
>>
>>
>> Sent from my LG G3, an AT&T 4G LTE smartphone
>>
>>
>> ------ Original message------
>>
>> From: Frédéric THOMAS
>>
>> Date: Sun, Aug 9, 2015 8:16 AM
>>
>> To: dev@flex.apache.org;
>>
>> Subject:RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
>>
>>
>> @Alex,
>>
>> Except of the @export, I've got an issue with:
>>
>> <include-namespaces>
>> <uri>library://ns.apache.org/flexjs/basic</uri>
>> <uri>library://ns.apache.org/flexjs/svg</uri>
>> </include-namespaces>
>>
>>
>> TextButton is not found in library://ns.apache.org/flexjs/svg, where is the manifest ? I'm a bit confuse here.
>>
>> If I remove it from include-namespace, I can now compile Core in IntelliJ with only one build configuration, it generates all the JS and the SWC in a once, not sure it is a valid SWC yet given I had to remove this namespace, in more I didn't migrate the JS to AS yet, I copy them into the SWC at the moment but my other test project tells me that I'm on the right way because it uses conditional compilation and I can generate the JS and SWC in a once too and it works.
>>
>> Frédéric THOMAS
>>
>>
>> ----------------------------------------
>>> Date: Sun, 9 Aug 2015 12:28:51 +0100
>>> Subject: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
>>> From: webdoublefx@hotmail.com
>>> To: dev@flex.apache.org
>>>
>>> That's that Mike.
>>> I don't use the externc.
>>>
>>> --- Message initial ---
>>>
>>> De : "Michael Schmalle" <te...@gmail.com>
>>> Envoyé : 9 août 2015 11:59
>>> A : dev@flex.apache.org
>>> Objet : Re: [FlexJS] Framework using externs (was: Setup Error)
>>>
>>> On Sun, Aug 9, 2015 at 1:06 AM, Alex Harui <ah...@adobe.com> wrote:
>>>
>>>>
>>>>
>>>> On 8/8/15, 12:38 PM, "Michael Schmalle" <te...@gmail.com> wrote:
>>>>
>>>>>On Sat, Aug 8, 2015 at 1:39 PM, Frédéric THOMAS <we...@hotmail.com>
>>>>>wrote:
>>>>>
>>>>>> Also, What to do to keep as doc, I've been trying -keep-asdoc but
>>>>>>
>>>>>>
>>>>>Fred, I looked at the code quickly, this should work right now and
>>>>>-keep-asdoc is ONLY for the @param description etc.
>>>>
>>>> It is supposed to grab all of the asdoc from the AS and append to the
>>>> JSDoc. It sounds like the JSDoc emitter isn’t wired up correctly, and it
>>>> is possible that the asdoc delegate is no longer configured correctly for
>>>> externs.
>>>>
>>>> -Alex
>>>>
>>>>
>>> What is this thread actually about, I was aware of what was being copied
>>> but I thought this was about porting FlexJS .js code to AS classes.
>>>
>>> Is Fred making extern files for FlexJS code? If he is porting, then he is
>>> using the FlexJS emitter, I didn't do anything weird, is he using the JSC
>>> compiler?
>>>
>>> Mike
>>
>
 		 	   		  

RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
> If that's the core swc then that's a mistake. Svg manifest should be in html project

Ok, thanks, will start migrating JS to AS in my next session.

Frédéric THOMAS


----------------------------------------
> From: aharui@adobe.com
> To: webdoublefx@hotmail.com; dev@flex.apache.org
> Subject: Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> Date: Sun, 9 Aug 2015 15:32:41 +0000
>
> If that's the core swc then that's a mistake. Svg manifest should be in html project
>
>
> Sent from my LG G3, an AT&T 4G LTE smartphone
>
>
> ------ Original message------
>
> From: Frédéric THOMAS
>
> Date: Sun, Aug 9, 2015 8:16 AM
>
> To: dev@flex.apache.org;
>
> Subject:RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
>
>
> @Alex,
>
> Except of the @export, I've got an issue with:
>
> <include-namespaces>
> <uri>library://ns.apache.org/flexjs/basic</uri>
> <uri>library://ns.apache.org/flexjs/svg</uri>
> </include-namespaces>
>
>
> TextButton is not found in library://ns.apache.org/flexjs/svg, where is the manifest ? I'm a bit confuse here.
>
> If I remove it from include-namespace, I can now compile Core in IntelliJ with only one build configuration, it generates all the JS and the SWC in a once, not sure it is a valid SWC yet given I had to remove this namespace, in more I didn't migrate the JS to AS yet, I copy them into the SWC at the moment but my other test project tells me that I'm on the right way because it uses conditional compilation and I can generate the JS and SWC in a once too and it works.
>
> Frédéric THOMAS
>
>
> ----------------------------------------
>> Date: Sun, 9 Aug 2015 12:28:51 +0100
>> Subject: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
>> From: webdoublefx@hotmail.com
>> To: dev@flex.apache.org
>>
>> That's that Mike.
>> I don't use the externc.
>>
>> --- Message initial ---
>>
>> De : "Michael Schmalle" <te...@gmail.com>
>> Envoyé : 9 août 2015 11:59
>> A : dev@flex.apache.org
>> Objet : Re: [FlexJS] Framework using externs (was: Setup Error)
>>
>> On Sun, Aug 9, 2015 at 1:06 AM, Alex Harui <ah...@adobe.com> wrote:
>>
>>>
>>>
>>> On 8/8/15, 12:38 PM, "Michael Schmalle" <te...@gmail.com> wrote:
>>>
>>>>On Sat, Aug 8, 2015 at 1:39 PM, Frédéric THOMAS <we...@hotmail.com>
>>>>wrote:
>>>>
>>>>> Also, What to do to keep as doc, I've been trying -keep-asdoc but
>>>>>
>>>>>
>>>>Fred, I looked at the code quickly, this should work right now and
>>>>-keep-asdoc is ONLY for the @param description etc.
>>>
>>> It is supposed to grab all of the asdoc from the AS and append to the
>>> JSDoc. It sounds like the JSDoc emitter isn’t wired up correctly, and it
>>> is possible that the asdoc delegate is no longer configured correctly for
>>> externs.
>>>
>>> -Alex
>>>
>>>
>> What is this thread actually about, I was aware of what was being copied
>> but I thought this was about porting FlexJS .js code to AS classes.
>>
>> Is Fred making extern files for FlexJS code? If he is porting, then he is
>> using the FlexJS emitter, I didn't do anything weird, is he using the JSC
>> compiler?
>>
>> Mike
>
 		 	   		  

Re: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Alex Harui <ah...@adobe.com>.
If that's the core swc then that's a mistake. Svg manifest should be in html project


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


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

From: Frédéric THOMAS

Date: Sun, Aug 9, 2015 8:16 AM

To: dev@flex.apache.org;

Subject:RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)


@Alex,

Except of the @export, I've got an issue with:

    <include-namespaces>
        <uri>library://ns.apache.org/flexjs/basic</uri>
        <uri>library://ns.apache.org/flexjs/svg</uri>
    </include-namespaces>


TextButton is not found in library://ns.apache.org/flexjs/svg, where is the manifest ? I'm a bit confuse here.

If I remove it from include-namespace, I can now compile Core in IntelliJ with only one build configuration, it generates all the JS and the SWC in a once, not sure it is a valid SWC yet given I had to remove this namespace, in more I didn't migrate the JS to AS yet, I copy them into the SWC at the moment but my other test project tells me that I'm on the right way because it uses conditional compilation and I can generate the JS and SWC in a once too and it works.

Frédéric THOMAS


----------------------------------------
> Date: Sun, 9 Aug 2015 12:28:51 +0100
> Subject: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
>
> That's that Mike.
> I don't use the externc.
>
> --- Message initial ---
>
> De : "Michael Schmalle" <te...@gmail.com>
> Envoyé : 9 août 2015 11:59
> A : dev@flex.apache.org
> Objet : Re: [FlexJS] Framework using externs (was: Setup Error)
>
> On Sun, Aug 9, 2015 at 1:06 AM, Alex Harui <ah...@adobe.com> wrote:
>
>>
>>
>> On 8/8/15, 12:38 PM, "Michael Schmalle" <te...@gmail.com> wrote:
>>
>>>On Sat, Aug 8, 2015 at 1:39 PM, Frédéric THOMAS <we...@hotmail.com>
>>>wrote:
>>>
>>>> Also, What to do to keep as doc, I've been trying -keep-asdoc but
>>>>
>>>>
>>>Fred, I looked at the code quickly, this should work right now and
>>>-keep-asdoc is ONLY for the @param description etc.
>>
>> It is supposed to grab all of the asdoc from the AS and append to the
>> JSDoc. It sounds like the JSDoc emitter isn’t wired up correctly, and it
>> is possible that the asdoc delegate is no longer configured correctly for
>> externs.
>>
>> -Alex
>>
>>
> What is this thread actually about, I was aware of what was being copied
> but I thought this was about porting FlexJS .js code to AS classes.
>
> Is Fred making extern files for FlexJS code? If he is porting, then he is
> using the FlexJS emitter, I didn't do anything weird, is he using the JSC
> compiler?
>
> Mike


RE: Re : Re: [FlexJS] Framework using externs (was: Setup Error)

Posted by Frédéric THOMAS <we...@hotmail.com>.
@Alex,

Except of the @export, I've got an issue with:

    <include-namespaces>
        <uri>library://ns.apache.org/flexjs/basic</uri>
        <uri>library://ns.apache.org/flexjs/svg</uri>
    </include-namespaces>  


TextButton is not found in library://ns.apache.org/flexjs/svg, where is the manifest ? I'm a bit confuse here.

If I remove it from include-namespace, I can now compile Core in IntelliJ with only one build configuration, it generates all the JS and the SWC in a once, not sure it is a valid SWC yet given I had to remove this namespace, in more I didn't migrate the JS to AS yet, I copy them into the SWC at the moment but my other test project tells me that I'm on the right way because it uses conditional compilation and I can generate the JS and SWC in a once too and it works.

Frédéric THOMAS


----------------------------------------
> Date: Sun, 9 Aug 2015 12:28:51 +0100
> Subject: Re : Re: [FlexJS] Framework using externs (was: Setup Error)
> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
>
> That's that Mike.
> I don't use the externc.
>
> --- Message initial ---
>
> De : "Michael Schmalle" <te...@gmail.com>
> Envoyé : 9 août 2015 11:59
> A : dev@flex.apache.org
> Objet : Re: [FlexJS] Framework using externs (was: Setup Error)
>
> On Sun, Aug 9, 2015 at 1:06 AM, Alex Harui <ah...@adobe.com> wrote:
>
>>
>>
>> On 8/8/15, 12:38 PM, "Michael Schmalle" <te...@gmail.com> wrote:
>>
>>>On Sat, Aug 8, 2015 at 1:39 PM, Frédéric THOMAS <we...@hotmail.com>
>>>wrote:
>>>
>>>> Also, What to do to keep as doc, I've been trying -keep-asdoc but
>>>>
>>>>
>>>Fred, I looked at the code quickly, this should work right now and
>>>-keep-asdoc is ONLY for the @param description etc.
>>
>> It is supposed to grab all of the asdoc from the AS and append to the
>> JSDoc. It sounds like the JSDoc emitter isn’t wired up correctly, and it
>> is possible that the asdoc delegate is no longer configured correctly for
>> externs.
>>
>> -Alex
>>
>>
> What is this thread actually about, I was aware of what was being copied
> but I thought this was about porting FlexJS .js code to AS classes.
>
> Is Fred making extern files for FlexJS code? If he is porting, then he is
> using the FlexJS emitter, I didn't do anything weird, is he using the JSC
> compiler?
>
> Mike