You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by OmPrakash Muppirala <bi...@gmail.com> on 2014/09/02 20:23:39 UTC

[FlexJS] Convert AS classes to JS?

I have created a slew of classes in the graphics library on the AS side.
Is there a way to stub out these classes in JS automatically instead of
having to do each one manually?  I know the internals have to be changed,
but if I have stuff automatically built, I figured it would make my life
easier.

Thanks,
Om

Re: [FlexJS] Convert AS classes to JS?

Posted by Erik de Bruin <er...@ixsoftware.nl>.
>
> So, in each class, I have a whole bunch of setters and getters I would like
> to be transformed.  There would likely be methods like draw, drawRect, etc.
> that need to be left empty.  Is that possible?  Or is that too specific?
>

Yes, way too specific ;-) I can 'do' ALL empty implementations, or none.

>From what I think I understand you're trying to do, this will be a one time
thing, right? Or maybe a few times, but all of it during development. I
think that just letting FalconJX cross compile all the code and you taking
out the incorrect/incompatible implementations will be most efficient.

So, follow the FlexJSJX path while you're developing, and once you're
satisfied with the JS implementation, move the stuff over to FlexJSUI so
the classes won't be cross compiled anymore.

EdB



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FlexJS] Convert AS classes to JS?

Posted by Peter Ent <pe...@adobe.com>.
FlexJSJX in structure is pretty identical to FlexJSUI. The difference is
in the frameworks/as/build.xml file. This is where FlexJSJX is told to
x-compile into JS. The result of that compile step is in
frameworks/js/FlexJS/libs. From there you copy the resulting .js files to
your ApacheFlexJS install.

At the moment, 100% of the class in FlexJSJX is x-compiled into
JavaScript; I don't think there is any way to avoid that. What I've done
in the charts package is the following:

I have the charts/core interfaces in FlexJSUI and I hand-wrote the JS
versions. 

Any class that I do not want cross-compiled goes into FlexJSUI so I can
hand-write the JS version. I do this for the itemRenderers since the AS
versions use Flash and the JS versions use SVG.

Peter Ent
Adobe Systems

On 9/2/14 2:40 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>On Tue, Sep 2, 2014 at 11:31 AM, Erik de Bruin <er...@ixsoftware.nl> wrote:
>
>> I believe Peter has some complete components he cross compiles from AS
>>to
>> JS. In theory any AS class can be compiled into JS ;-)
>>
>
>Yes, I would like that please.
>http://www.reactiongifs.us/wp-content/uploads/2013/08/give_it_to_me_stephe
>n_colbert.gif
>
>
>>
>> If there is any specific way you want FalconJX to treat your files, just
>> let me know. I can e.g. make empty JS stubs by not compiling the
>> implementation, and hook that up to a command line switch.
>>
>
>So, in each class, I have a whole bunch of setters and getters I would
>like
>to be transformed.  There would likely be methods like draw, drawRect,
>etc.
>that need to be left empty.  Is that possible?  Or is that too specific?
>
>Thanks,
>Om
>
>
>>
>> EdB
>>
>>
>>
>> On Tue, Sep 2, 2014 at 8:23 PM, OmPrakash Muppirala
>><bi...@gmail.com>
>> wrote:
>>
>> > I have created a slew of classes in the graphics library on the AS
>>side.
>> > Is there a way to stub out these classes in JS automatically instead
>>of
>> > having to do each one manually?  I know the internals have to be
>>changed,
>> > but if I have stuff automatically built, I figured it would make my
>>life
>> > easier.
>> >
>> > Thanks,
>> > Om
>> >
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>>


Re: [FlexJS] Convert AS classes to JS?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Tue, Sep 2, 2014 at 11:31 AM, Erik de Bruin <er...@ixsoftware.nl> wrote:

> I believe Peter has some complete components he cross compiles from AS to
> JS. In theory any AS class can be compiled into JS ;-)
>

Yes, I would like that please.
http://www.reactiongifs.us/wp-content/uploads/2013/08/give_it_to_me_stephen_colbert.gif


>
> If there is any specific way you want FalconJX to treat your files, just
> let me know. I can e.g. make empty JS stubs by not compiling the
> implementation, and hook that up to a command line switch.
>

So, in each class, I have a whole bunch of setters and getters I would like
to be transformed.  There would likely be methods like draw, drawRect, etc.
that need to be left empty.  Is that possible?  Or is that too specific?

Thanks,
Om


>
> EdB
>
>
>
> On Tue, Sep 2, 2014 at 8:23 PM, OmPrakash Muppirala <bi...@gmail.com>
> wrote:
>
> > I have created a slew of classes in the graphics library on the AS side.
> > Is there a way to stub out these classes in JS automatically instead of
> > having to do each one manually?  I know the internals have to be changed,
> > but if I have stuff automatically built, I figured it would make my life
> > easier.
> >
> > Thanks,
> > Om
> >
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

Re: [FlexJS] Convert AS classes to JS?

Posted by Erik de Bruin <er...@ixsoftware.nl>.
I believe Peter has some complete components he cross compiles from AS to
JS. In theory any AS class can be compiled into JS ;-)

If there is any specific way you want FalconJX to treat your files, just
let me know. I can e.g. make empty JS stubs by not compiling the
implementation, and hook that up to a command line switch.

EdB



On Tue, Sep 2, 2014 at 8:23 PM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> I have created a slew of classes in the graphics library on the AS side.
> Is there a way to stub out these classes in JS automatically instead of
> having to do each one manually?  I know the internals have to be changed,
> but if I have stuff automatically built, I figured it would make my life
> easier.
>
> Thanks,
> Om
>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FlexJS] Convert AS classes to JS?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Tue, Sep 2, 2014 at 11:30 AM, Alex Harui <ah...@adobe.com> wrote:

> Yep, look at how the FlexJSJX swc is set up.


More specific, please?  I am looking at them and FlexJSUI and FlexJSJX seem
quite similar to each other.


>   You can then keep them as
> auto generated, or after one crank through, switch the setup to how the
> FlexJSUI swc is set up and manually code the JS after that.
>
> -Alex
>
> On 9/2/14 11:23 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >I have created a slew of classes in the graphics library on the AS side.
> >Is there a way to stub out these classes in JS automatically instead of
> >having to do each one manually?  I know the internals have to be changed,
> >but if I have stuff automatically built, I figured it would make my life
> >easier.
> >
> >Thanks,
> >Om
>
>

Re: [FlexJS] Convert AS classes to JS?

Posted by Alex Harui <ah...@adobe.com>.
Yep, look at how the FlexJSJX swc is set up.  You can then keep them as
auto generated, or after one crank through, switch the setup to how the
FlexJSUI swc is set up and manually code the JS after that.

-Alex

On 9/2/14 11:23 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>I have created a slew of classes in the graphics library on the AS side.
>Is there a way to stub out these classes in JS automatically instead of
>having to do each one manually?  I know the internals have to be changed,
>but if I have stuff automatically built, I figured it would make my life
>easier.
>
>Thanks,
>Om