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 2013/07/29 21:17:03 UTC
[FlexJS] Handling interfaces
On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com> wrote:
> I think FalconJS was going to generate something like:
>
> if (child != undefined &&
> child.$implements["org.apache.flex.core.IChrome"])
>
> Not sure what it was going to do for classes, maybe chase the prototype
> chain?
>
> The other thing that occurred to me about $implements or child.is(IChrome)
> is that all objects must then have these properties or functions where the
> global function could work out of a central database that doesn't decorate
> the classes.
>
> I don't have a strong opinion either way right now.
>
> -Alex
>
>From all my research on Closure's @implements handling, it seems like there
should be at least one method/member in the @interface. So how will it
handle 'Marker Interfaces', i.e. interfaces which have no methods.
IChrome - which we have been discussing in the other thread is this kind of
an interface. It is used to just mark an object so it can be used for type
checking.
Is this possible with Closure? Sorry, I have not set up to Closure
properly on my machine. Can one of you try this out to see if it is
possible?
Thanks,
Om
>
> On 7/29/13 10:49 AM, "Kessler CTR Mark J" <ma...@usmc.mil>
> wrote:
>
> >Looking on it a second time, I guess you have to test it exists in there
> >for both, so maybe it's a moot issue.
> >
> >-Mark
> >
> >-----Original Message-----
> >From: Kessler CTR Mark J [mailto:mark.kessler.ctr@usmc.mil]
> >Sent: Monday, July 29, 2013 1:43 PM
> >To: dev@flex.apache.org
> >Subject: RE: [FlexJS] Handling chrome elements
> >
> > I've gotten used to being able to do Type checks with "is". It also
> >stands out as a different format visually. I think the only problem
> >with that change is, the child couldn't be null/undefined. It would have
> >to be able to run that method. Whereas the current "is" can compare the
> >datatype with it being null/undefined.
> >
> >
> >-Mark
> >
> >-----Original Message-----
> >From: Erik de Bruin [mailto:erik@ixsoftware.nl]
> >Sent: Monday, July 29, 2013 12:59 PM
> >To: dev@flex.apache.org
> >Subject: Re: [FlexJS] Handling chrome elements
> >
> >Ah, the "is" issue.
> >
> >We don't seem to be able to get out from under a 'helper' method (or
> >whatever the term-du-jour is for that thing) and a 'storage' property.
> >
> >Personally I like to go from this AS:
> >
> >if (child is IChrome)
> >
> >to this JS:
> >
> >if (child.is(IChrome))
> >
> >That would make it relatively easy to work with it in the cross
> >compiler. Another possibility is to have a global function, but I
> >don't like that very much.
> >
> >Thoughts?
> >
> >EdB
> >
> >
> >
> >On Mon, Jul 29, 2013 at 4:23 PM, Alex Harui <ah...@adobe.com> wrote:
> >> Thanks for that. I'm more interested in the runtime use of interfaces.
> >> What is the JS output for this AS?
> >>
> >> if (child is IChrome)
> >>
> >> It looked like FalconJS was going to create a $implements object on each
> >> class and "is" code would test against that. What should we do for
> >> FalconJX?
> >>
> >> Thanks,
> >> -Alex
> >>
> >>
> >> On 7/28/13 11:50 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
> >>
> >>>More on how to write the JS side:
> >>>
> >>>
> https://developers.google.com/closure/compiler/docs/js-for-compiler#tags
> >>>
> >>>Search for '@implements'. It has a short but sweet example.
> >>>
> >>>EdB
> >>>
> >>>
> >>>
> >>>On Mon, Jul 29, 2013 at 8:43 AM, Erik de Bruin <er...@ixsoftware.nl>
> >>>wrote:
> >>>>>> >Also IChrome (looks like a Marker Interface) could lead to a subtle
> >>>>>> >problem
> >>>>>> >on the JS side. I have not been following the conversation on how
> >>>>>>to deal
> >>>>>> >with Interfaces on the JS side. If we are planning on using 'duck
> >>>>>> >typing',
> >>>>>> >then we could run into issues with empty interfaces. Or am I
> >>>>>>missing
> >>>>>> >something here?
> >>>>>> I'm not sure what we'll end up doing for interfaces on JS. It looks
> >>>>>>like
> >>>>>> some compiler code expects to list interfaces in an $implements
> >>>>>>property
> >>>>>> object.
> >>>>>>
> >>>>>
> >>>>> Can someone shine some light on this? Erik, Michael?
> >>>>
> >>>> Interfaces on the JS side are implemented for the Closure Compiler
> >>>> using the @interface for declaration and the @implements JSDoc
> >>>> annotation. FalconJx knows about this, so - with caution and testing -
> >>>> you should be able to approach interfaces the same in JS as in AS.
> >>>>
> >>>> Let me know if I can help out with some example code or something.
> >>>> Also, if you run into problems, I can alway crack open FalconJx and
> >>>> create the solution you would like to see.
> >>>>
> >>>> EdB
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Ix Multimedia Software
> >>>>
> >>>> Jan Luykenstraat 27
> >>>> 3521 VB Utrecht
> >>>>
> >>>> T. 06-51952295
> >>>> I. www.ixsoftware.nl
> >>>
> >>>
> >>>
> >>>--
> >>>Ix Multimedia Software
> >>>
> >>>Jan Luykenstraat 27
> >>>3521 VB Utrecht
> >>>
> >>>T. 06-51952295
> >>>I. www.ixsoftware.nl
> >>
> >
> >
> >
> >--
> >Ix Multimedia Software
> >
> >Jan Luykenstraat 27
> >3521 VB Utrecht
> >
> >T. 06-51952295
> >I. www.ixsoftware.nl
>
>
Re: [FlexJS] Handling interfaces
Posted by Alex Harui <ah...@adobe.com>.
There are a few places where there is a main compilation unit. I think
even a mainCU variable.
And you might be able to inject in the publishing phase. You know the
main file by then as well.
-Alex
On 10/31/13 3:49 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>Ok, rounding off the 'is' and 'as' implementation.
>
>One quick question: how do I figure out - in FalconJx - if the
>'current' class is the 'main' or 'toplevel' class? I need to inject a
>special 'goog.require', which I rather don't do in all classes,
>instead I'd like to only add it to the first class ('Application' or
>similar)...
>
>Thoughts?
>
>EdB
>
>
>
>On Thu, Oct 31, 2013 at 6:05 PM, Alex Harui <ah...@adobe.com> wrote:
>> It's been so long since I've seen that, that I don't completely
>>remember.
>>
>> I believe it could be a Java class path issue. That the compiler is
>> picking up an different version of MapMaker than expected.
>>
>> -Alex
>>
>> On 10/31/13 9:58 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>
>>>And I killed it again... Now I'm getting this (vaguely familiar) error:
>>>
>>>Using Falcon codebase:
>>>/Users/erik/Documents/ApacheFlex/git/flex-falcon/compiler.jx/bin/../../c
>>>om
>>>piler
>>>Using Flex SDK: /Users/erik/Desktop/OverlayedSDK
>>>Exception in thread "main" java.lang.IllegalAccessError: tried to
>>>access method
>>>com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/b
>>>as
>>>e/Function;)Ljava/util/concurrent/ConcurrentMap;
>>>from class org.apache.flex.compiler.internal.projects.CompilerProject
>>>at
>>>org.apache.flex.compiler.internal.projects.CompilerProject.<init>(Compil
>>>er
>>>Project.java:114)
>>>at
>>>org.apache.flex.compiler.internal.projects.ASProject.<init>(ASProject.ja
>>>va
>>>:71)
>>>at
>>>org.apache.flex.compiler.internal.projects.FlexProject.<init>(FlexProjec
>>>t.
>>>java:109)
>>>at
>>>org.apache.flex.compiler.internal.projects.FlexProject.<init>(FlexProjec
>>>t.
>>>java:129)
>>>at
>>>org.apache.flex.compiler.internal.projects.FlexJSProject.<init>(FlexJSPr
>>>oj
>>>ect.java:48)
>>>at org.apache.flex.compiler.clients.MXMLJSC.<init>(MXMLJSC.java:198)
>>>at org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC.java:171)
>>>
>>>Remind me, how do I fix this?
>>>
>>>EdB
>>>
>>>
>>>
>>>On Thu, Oct 31, 2013 at 3:09 PM, Erik de Bruin <er...@ixsoftware.nl>
>>>wrote:
>>>> Basically, I'm complaining it's getting too hard to develop for this,
>>>> but I guess that's to be expected at this stage.
>>>>
>>>> It's up and running now.
>>>>
>>>> EdB
>>>>
>>>>
>>>>
>>>> On Thu, Oct 31, 2013 at 2:33 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>> Not sure what you're asking. There isn't any Adobe code in there.
>>>>>The
>>>>> zip contains binaries so it can't go in the repo. The sh/bat files
>>>>>in
>>>>>the
>>>>> zip are not in the repo because I keep hoping they will go away
>>>>>someday
>>>>> and be replaced by an installer.
>>>>>
>>>>> -Alex
>>>>>
>>>>> On 10/31/13 6:30 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>
>>>>>>Ok... is that proprietary code, or just not in the repo yet?
>>>>>>
>>>>>>EdB
>>>>>>
>>>>>>
>>>>>>
>>>>>>On Thu, Oct 31, 2013 at 2:26 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>>> By using the FlexJSOverlay.zip on my people.a.o folder.
>>>>>>>Instructions
>>>>>>>are
>>>>>>> available at
>>>>>>>
>>>>>>>https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+A
>>>>>>>do
>>>>>>>be+
>>>>>>>Fl
>>>>>>> ash+Builder
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>> On 10/31/13 6:20 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>>
>>>>>>>>And how does one 'overlay' an SDK?
>>>>>>>>
>>>>>>>>EdB
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>On Thu, Oct 31, 2013 at 2:07 PM, Alex Harui <ah...@adobe.com>
>>>>>>>>wrote:
>>>>>>>>> I've been testing against DataBindingTest whose sources are up on
>>>>>>>>>my
>>>>>>>>> people.a.o folder, so maybe this doesn't build anymore, but the
>>>>>>>>>console
>>>>>>>>> output looks like you are referencing a full Apache Flex SDK
>>>>>>>>>instead
>>>>>>>>>of
>>>>>>>>> one that is overlaid, which might cause the compiler to find CSS
>>>>>>>>>files
>>>>>>>>>in
>>>>>>>>> a whole bunch of SWCs that we don't currently handle.
>>>>>>>>>
>>>>>>>>> IOW, you can't just add FlexJSUI.swc to an existing SDK, it has
>>>>>>>>>to
>>>>>>>>>be
>>>>>>>>> "overlaid" which neuters some things in an Apache Flex SDK.
>>>>>>>>>
>>>>>>>>> -Alex
>>>>>>>>>
>>>>>>>>> On 10/31/13 5:29 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>>>>
>>>>>>>>>>Hi,
>>>>>>>>>>
>>>>>>>>>>I'm busy building support for the "is" and "as" operators into
>>>>>>>>>>FlexJS.
>>>>>>>>>>Now, first I thought I'd try to compile the FlexJSTest_again
>>>>>>>>>>example.
>>>>>>>>>>To my suprise, I get an error:
>>>>>>>>>>
>>>>>>>>>>CSS codegen problem. Reason: 'Unable to find compilation unit for
>>>>>>>>>>Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
>>>>>>>>>>
>>>>>>>>>>The error seems to originate from FalconJx, it is thrown in
>>>>>>>>>>JSCSSCompilationSession.java... Now, my sources are fresh, I've
>>>>>>>>>>rebuild the SDK (super-clean main), all compiler projects (wipe
>>>>>>>>>>main)
>>>>>>>>>>and the FlexUI.swc. Am I missing something (command line arg) or
>>>>>>>>>>is
>>>>>>>>>>there some source not yet committed or something more obvious I'm
>>>>>>>>>>overlooking?
>>>>>>>>>>
>>>>>>>>>>These are my arguments:
>>>>>>>>>>
>>>>>>>>>>+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependenc
>>>>>>>>>>ie
>>>>>>>>>>s/P
>>>>>>>>>>la
>>>>>>>>>>ye
>>>>>>>>>>rGlobal/player
>>>>>>>>>>+playerglobal.version=11.1
>>>>>>>>>>-load-config="/Applications/Adobe Flash Builder
>>>>>>>>>>4.7/sdks/4.10.0/frameworks/flex-config.xml"
>>>>>>>>>>-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/fra
>>>>>>>>>>me
>>>>>>>>>>wor
>>>>>>>>>>ks
>>>>>>>>>>/a
>>>>>>>>>>s/libs/FlexJSUI.swc
>>>>>>>>>>-js-output-type=FLEXJS
>>>>>>>>>>-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/Google
>>>>>>>>>>Cl
>>>>>>>>>>osu
>>>>>>>>>>re
>>>>>>>>>>/l
>>>>>>>>>>ibrary
>>>>>>>>>>-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/framew
>>>>>>>>>>or
>>>>>>>>>>ks/
>>>>>>>>>>js
>>>>>>>>>>/F
>>>>>>>>>>lexJS/src
>>>>>>>>>>/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTes
>>>>>>>>>>t_
>>>>>>>>>>aga
>>>>>>>>>>in
>>>>>>>>>>/s
>>>>>>>>>>rc/FlexJSTest_again.mxml
>>>>>>>>>>
>>>>>>>>>>EdB
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin
>>>>>>>>>><er...@ixsoftware.nl>
>>>>>>>>>>wrote:
>>>>>>>>>>> I'll have a look at it today.
>>>>>>>>>>>
>>>>>>>>>>> EdB
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Wednesday, October 30, 2013, Peter Ent wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks, Erik. Interesting read. FlexJS uses a lot of
>>>>>>>>>>>>interfaces
>>>>>>>>>>>>so
>>>>>>>>>>>>we'll
>>>>>>>>>>>> have to find a reasonable solution for this. We've managed to
>>>>>>>>>>>>avoid
>>>>>>>>>>>>the
>>>>>>>>>>>> situation in JavaScript but it is coming up quickly.
>>>>>>>>>>>>
>>>>>>>>>>>> --peter
>>>>>>>>>>>>
>>>>>>>>>>>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl>
>>>>>>>>>>>>wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> >Some guidance can be found here [1] and here [2].
>>>>>>>>>>>> >
>>>>>>>>>>>> >EdB
>>>>>>>>>>>> >
>>>>>>>>>>>> >1:
>>>>>>>>>>>>
>>>>>>>>>>>> >
>>>>>>>>>>>>>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance
>>>>>>>>>>>>>-i
>>>>>>>>>>>>>nte
>>>>>>>>>>>>>rf
>>>>>>>>>>>>>ac
>>>>>>>>>>>>>es-
>>>>>>>>>>>> >packages-and-namespaces/
>>>>>>>>>>>> >2:
>>>>>>>>>>>>
>>>>>>>>>>>> >
>>>>>>>>>>>>>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS
>>>>>>>>>>>>>3+
>>>>>>>>>>>>>lan
>>>>>>>>>>>>>gu
>>>>>>>>>>>>>ag
>>>>>>>>>>>>>e+f
>>>>>>>>>>>> >eatures+in+JavaScript+using+AMD+and+ES5
>>>>>>>>>>>> >
>>>>>>>>>>>> >
>>>>>>>>>>>> >
>>>>>>>>>>>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin
>>>>>>>>>>>><er...@ixsoftware.nl>
>>>>>>>>>>>> > wrote:
>>>>>>>>>>>> >> "instanceof" doesn't check if an interface is implemented,
>>>>>>>>>>>>neither
>>>>>>>>>>>>in
>>>>>>>>>>>> >> Flex nor using Closure inheritance in JavaScript. What we
>>>>>>>>>>>>need
>>>>>>>>>>>>for
>>>>>>>>>>>> >> runtime checking of interface implementation is an global
>>>>>>>>>>>>"is"
>>>>>>>>>>>> >> function... I think I taught FalconJx to translate "ClassA
>>>>>>>>>>>>is
>>>>>>>>>>>>ClassB"
>>>>>>>>>>>> >> as "is(ClassA, ClassB)". All we need to do now is to
>>>>>>>>>>>>implement a
>>>>>>>>>>>> >> global "is()" function and somehow teach the compiler to
>>>>>>>>>>>>keep
>>>>>>>>>>>>track
>>>>>>>>>>>>of
>>>>>>>>>>>> >> which classes implement which interfaces - all the way up
>>>>>>>>>>>>the
>>>>>>>>>>>>chain
>>>>>>>>>>>> >> and sideways (interfaces can implement interfaces).
>>>>>>>>>>>> >>
>>>>>>>>>>>> >> EdB
>>>>>>>>>>>> >>
>>>>>>>>>>>> >>
>>>>>>>>>>>> >>
>>>>>>>>>>>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui
>>>>>>>>>>>><ah...@adobe.com>
>>>>>>>>>>>>wrote:
>>>>>>>>>>>> >>> Reviving this thread...
>>>>>>>>>>>> >>>
>>>>>>>>>>>> >>> Peter says he wants to test to see if an object implements
>>>>>>>>>>>>an
>>>>>>>>>>>> >>>interface at
>>>>>>>>>>>> >>> runtime. What mechanism do we want to use?
>>>>>>>>>>>> >>>
>>>>>>>>>>>> >>> I don't think we need to make instanceof work, just have
>>>>>>>>>>>>some
>>>>>>>>>>>>test
>>>>>>>>>>>>to
>>>>>>>>>>>> >>>call.
>>>>>>>>>>>> >>>
>>>>>>>>>>>> >>> -Alex
>>>>>>>>>>>> >>>
>>>>>>>>>>>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl>
>>>>>>>>>>>>wrote:
>>>>>>>>>>>> >>>
>>>>>>>>>>>> >>>>When using interfaces for type checking, there are two
>>>>>>>>>>>>'kinds':
>>>>>>>>>>>>at
>>>>>>>>>>>> >>>>compilation and at runtime.
>>>>>>>>>>>> >>>>
>>>>>>>>>>>> >>>>The @interface and @implements annotations are for compile
>>>>>>>>>>>>time
>>>>>>>>>>>> >>>>checking.
>>>>>>>>>>>> >>>>
>>>>>>>>>>>> >>>>For runtime checking comes in two flavours: 'instanceof'
>>>>>>>>>>>>and
>>>>>>>>>>>>'is'.
>>>>>>>>>>>> >>>>
>>>>>>>>>>>> >>>>Our method of setting up inheritance (goog.inherits)
>>>>>>>>>>>>maintains
>>>>>>>>>>>>the
>>>>>>>>>>>> >>>>inheritance chain, so 'instanceof' works out of the box.
>>>>>>>>>>>> >>>>
>>>>>>>>>>>> >>>>The work starts with 'is'. We want to story the 'extends'
>>>>>>>>>>>>and
>>>>>>>>>>>> >>>>'implements' metadata from AS in the JS classes and
>>>>>>>>>>>>create a
>>>>>>>>>>>>method to
>>>>>>>>>>>> >>>>test against that metadata set. I have a pretty good idea
>>>>>>>>>>>>on
>>>>>>>>>>>>how
>>>>>>>>>>>>to
>>>>>>>>>>>> >>>>implement such a beast, but it will require some (ha!)
>>>>>>>>>>>>tinkering
>>>>>>>>>>>>with
>>>>>>>>>>>> >>>>the FlexJS JS framework and FalconJx. That will take some
>>>>>>>>>>>>time...
>>>>>>>>>>>> >>>>
>>>>>>>>>>>> >>>>EdB
>>>>>>>>>>>> >>>>
>>>>>>>>>>>> >>>>
>>>>>>>>>>>> >>>>
>>>>>>>>>>>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>>>>>>>>>>> >>>><bi...@gmail.com> wrote:
>>>>>>>>>>>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui
>>>>>>>>>>>><ah...@adobe.com>
>>>>>>>>>>>> >>>>>wrote:
>>>>>>>>>>>> >>>>>
>>>>>>>>>>>> >>>>>> I think FalconJS was going to generate something like:
>>>>>>>>>>>> >>>>>>
>>>>>>>>>>>> >>>>>> if (child != undefined &&
>>>>>>>>>>>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>>>>>>>>> >>>>>>
>>>>>>>>>>>> >>>>>> Not sure what it was going to do for classes, maybe
>>>>>>>>>>>>chase
>>>>>>>>>>>>the
>>>>>>>>>>>> >>>>>>prototype
>>>>>>>>>>>> >>>>>> chain?
>>>>>>>>>>>> >>>>>>
>>>>>>>>>>>> >>>>>> The other thing that occurred to me about $implements
>>>>>>>>>>>>or
>>>>>>>>>>>> >>>>>>child.is(IChrome)
>>>>>>>>>>>> >>>>>> is that all objects must then have these properties or
>>>>>>>>>>>>functions
>>>>>>>>>>>> >>>>>>where
>>>>>>>>>>>> >>>>>>the
>>>>>>>>>>>> >>>>>> global function
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Ix Multimedia Software
>>>>>>>>>>>
>>>>>>>>>>> Jan Luykenstraat 27
>>>>>>>>>>> 3521 VB Utrecht
>>>>>>>>>>>
>>>>>>>>>>> T. 06-51952295
>>>>>>>>>>> I. www.ixsoftware.nl
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>--
>>>>>>>>>>Ix Multimedia Software
>>>>>>>>>>
>>>>>>>>>>Jan Luykenstraat 27
>>>>>>>>>>3521 VB Utrecht
>>>>>>>>>>
>>>>>>>>>>T. 06-51952295
>>>>>>>>>>I. www.ixsoftware.nl
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>--
>>>>>>>>Ix Multimedia Software
>>>>>>>>
>>>>>>>>Jan Luykenstraat 27
>>>>>>>>3521 VB Utrecht
>>>>>>>>
>>>>>>>>T. 06-51952295
>>>>>>>>I. www.ixsoftware.nl
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>--
>>>>>>Ix Multimedia Software
>>>>>>
>>>>>>Jan Luykenstraat 27
>>>>>>3521 VB Utrecht
>>>>>>
>>>>>>T. 06-51952295
>>>>>>I. www.ixsoftware.nl
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Ix Multimedia Software
>>>>
>>>> Jan Luykenstraat 27
>>>> 3521 VB Utrecht
>>>>
>>>> T. 06-51952295
>>>> I. www.ixsoftware.nl
>>>
>>>
>>>
>>>--
>>>Ix Multimedia Software
>>>
>>>Jan Luykenstraat 27
>>>3521 VB Utrecht
>>>
>>>T. 06-51952295
>>>I. www.ixsoftware.nl
>>
>
>
>
>--
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Ok, rounding off the 'is' and 'as' implementation.
One quick question: how do I figure out - in FalconJx - if the
'current' class is the 'main' or 'toplevel' class? I need to inject a
special 'goog.require', which I rather don't do in all classes,
instead I'd like to only add it to the first class ('Application' or
similar)...
Thoughts?
EdB
On Thu, Oct 31, 2013 at 6:05 PM, Alex Harui <ah...@adobe.com> wrote:
> It's been so long since I've seen that, that I don't completely remember.
>
> I believe it could be a Java class path issue. That the compiler is
> picking up an different version of MapMaker than expected.
>
> -Alex
>
> On 10/31/13 9:58 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>
>>And I killed it again... Now I'm getting this (vaguely familiar) error:
>>
>>Using Falcon codebase:
>>/Users/erik/Documents/ApacheFlex/git/flex-falcon/compiler.jx/bin/../../com
>>piler
>>Using Flex SDK: /Users/erik/Desktop/OverlayedSDK
>>Exception in thread "main" java.lang.IllegalAccessError: tried to
>>access method
>>com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/bas
>>e/Function;)Ljava/util/concurrent/ConcurrentMap;
>>from class org.apache.flex.compiler.internal.projects.CompilerProject
>>at
>>org.apache.flex.compiler.internal.projects.CompilerProject.<init>(Compiler
>>Project.java:114)
>>at
>>org.apache.flex.compiler.internal.projects.ASProject.<init>(ASProject.java
>>:71)
>>at
>>org.apache.flex.compiler.internal.projects.FlexProject.<init>(FlexProject.
>>java:109)
>>at
>>org.apache.flex.compiler.internal.projects.FlexProject.<init>(FlexProject.
>>java:129)
>>at
>>org.apache.flex.compiler.internal.projects.FlexJSProject.<init>(FlexJSProj
>>ect.java:48)
>>at org.apache.flex.compiler.clients.MXMLJSC.<init>(MXMLJSC.java:198)
>>at org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC.java:171)
>>
>>Remind me, how do I fix this?
>>
>>EdB
>>
>>
>>
>>On Thu, Oct 31, 2013 at 3:09 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
>>> Basically, I'm complaining it's getting too hard to develop for this,
>>> but I guess that's to be expected at this stage.
>>>
>>> It's up and running now.
>>>
>>> EdB
>>>
>>>
>>>
>>> On Thu, Oct 31, 2013 at 2:33 PM, Alex Harui <ah...@adobe.com> wrote:
>>>> Not sure what you're asking. There isn't any Adobe code in there. The
>>>> zip contains binaries so it can't go in the repo. The sh/bat files in
>>>>the
>>>> zip are not in the repo because I keep hoping they will go away someday
>>>> and be replaced by an installer.
>>>>
>>>> -Alex
>>>>
>>>> On 10/31/13 6:30 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>
>>>>>Ok... is that proprietary code, or just not in the repo yet?
>>>>>
>>>>>EdB
>>>>>
>>>>>
>>>>>
>>>>>On Thu, Oct 31, 2013 at 2:26 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>> By using the FlexJSOverlay.zip on my people.a.o folder. Instructions
>>>>>>are
>>>>>> available at
>>>>>>
>>>>>>https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Ado
>>>>>>be+
>>>>>>Fl
>>>>>> ash+Builder
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>> On 10/31/13 6:20 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>
>>>>>>>And how does one 'overlay' an SDK?
>>>>>>>
>>>>>>>EdB
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>On Thu, Oct 31, 2013 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>>>> I've been testing against DataBindingTest whose sources are up on
>>>>>>>>my
>>>>>>>> people.a.o folder, so maybe this doesn't build anymore, but the
>>>>>>>>console
>>>>>>>> output looks like you are referencing a full Apache Flex SDK
>>>>>>>>instead
>>>>>>>>of
>>>>>>>> one that is overlaid, which might cause the compiler to find CSS
>>>>>>>>files
>>>>>>>>in
>>>>>>>> a whole bunch of SWCs that we don't currently handle.
>>>>>>>>
>>>>>>>> IOW, you can't just add FlexJSUI.swc to an existing SDK, it has to
>>>>>>>>be
>>>>>>>> "overlaid" which neuters some things in an Apache Flex SDK.
>>>>>>>>
>>>>>>>> -Alex
>>>>>>>>
>>>>>>>> On 10/31/13 5:29 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>>>
>>>>>>>>>Hi,
>>>>>>>>>
>>>>>>>>>I'm busy building support for the "is" and "as" operators into
>>>>>>>>>FlexJS.
>>>>>>>>>Now, first I thought I'd try to compile the FlexJSTest_again
>>>>>>>>>example.
>>>>>>>>>To my suprise, I get an error:
>>>>>>>>>
>>>>>>>>>CSS codegen problem. Reason: 'Unable to find compilation unit for
>>>>>>>>>Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
>>>>>>>>>
>>>>>>>>>The error seems to originate from FalconJx, it is thrown in
>>>>>>>>>JSCSSCompilationSession.java... Now, my sources are fresh, I've
>>>>>>>>>rebuild the SDK (super-clean main), all compiler projects (wipe
>>>>>>>>>main)
>>>>>>>>>and the FlexUI.swc. Am I missing something (command line arg) or is
>>>>>>>>>there some source not yet committed or something more obvious I'm
>>>>>>>>>overlooking?
>>>>>>>>>
>>>>>>>>>These are my arguments:
>>>>>>>>>
>>>>>>>>>+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependencie
>>>>>>>>>s/P
>>>>>>>>>la
>>>>>>>>>ye
>>>>>>>>>rGlobal/player
>>>>>>>>>+playerglobal.version=11.1
>>>>>>>>>-load-config="/Applications/Adobe Flash Builder
>>>>>>>>>4.7/sdks/4.10.0/frameworks/flex-config.xml"
>>>>>>>>>-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frame
>>>>>>>>>wor
>>>>>>>>>ks
>>>>>>>>>/a
>>>>>>>>>s/libs/FlexJSUI.swc
>>>>>>>>>-js-output-type=FLEXJS
>>>>>>>>>-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/GoogleCl
>>>>>>>>>osu
>>>>>>>>>re
>>>>>>>>>/l
>>>>>>>>>ibrary
>>>>>>>>>-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/framewor
>>>>>>>>>ks/
>>>>>>>>>js
>>>>>>>>>/F
>>>>>>>>>lexJS/src
>>>>>>>>>/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTest_
>>>>>>>>>aga
>>>>>>>>>in
>>>>>>>>>/s
>>>>>>>>>rc/FlexJSTest_again.mxml
>>>>>>>>>
>>>>>>>>>EdB
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin <er...@ixsoftware.nl>
>>>>>>>>>wrote:
>>>>>>>>>> I'll have a look at it today.
>>>>>>>>>>
>>>>>>>>>> EdB
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wednesday, October 30, 2013, Peter Ent wrote:
>>>>>>>>>>>
>>>>>>>>>>> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces
>>>>>>>>>>>so
>>>>>>>>>>>we'll
>>>>>>>>>>> have to find a reasonable solution for this. We've managed to
>>>>>>>>>>>avoid
>>>>>>>>>>>the
>>>>>>>>>>> situation in JavaScript but it is coming up quickly.
>>>>>>>>>>>
>>>>>>>>>>> --peter
>>>>>>>>>>>
>>>>>>>>>>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>>>>>>
>>>>>>>>>>> >Some guidance can be found here [1] and here [2].
>>>>>>>>>>> >
>>>>>>>>>>> >EdB
>>>>>>>>>>> >
>>>>>>>>>>> >1:
>>>>>>>>>>>
>>>>>>>>>>> >
>>>>>>>>>>>>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-i
>>>>>>>>>>>>nte
>>>>>>>>>>>>rf
>>>>>>>>>>>>ac
>>>>>>>>>>>>es-
>>>>>>>>>>> >packages-and-namespaces/
>>>>>>>>>>> >2:
>>>>>>>>>>>
>>>>>>>>>>> >
>>>>>>>>>>>>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+
>>>>>>>>>>>>lan
>>>>>>>>>>>>gu
>>>>>>>>>>>>ag
>>>>>>>>>>>>e+f
>>>>>>>>>>> >eatures+in+JavaScript+using+AMD+and+ES5
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin
>>>>>>>>>>><er...@ixsoftware.nl>
>>>>>>>>>>> > wrote:
>>>>>>>>>>> >> "instanceof" doesn't check if an interface is implemented,
>>>>>>>>>>>neither
>>>>>>>>>>>in
>>>>>>>>>>> >> Flex nor using Closure inheritance in JavaScript. What we
>>>>>>>>>>>need
>>>>>>>>>>>for
>>>>>>>>>>> >> runtime checking of interface implementation is an global
>>>>>>>>>>>"is"
>>>>>>>>>>> >> function... I think I taught FalconJx to translate "ClassA is
>>>>>>>>>>>ClassB"
>>>>>>>>>>> >> as "is(ClassA, ClassB)". All we need to do now is to
>>>>>>>>>>>implement a
>>>>>>>>>>> >> global "is()" function and somehow teach the compiler to keep
>>>>>>>>>>>track
>>>>>>>>>>>of
>>>>>>>>>>> >> which classes implement which interfaces - all the way up the
>>>>>>>>>>>chain
>>>>>>>>>>> >> and sideways (interfaces can implement interfaces).
>>>>>>>>>>> >>
>>>>>>>>>>> >> EdB
>>>>>>>>>>> >>
>>>>>>>>>>> >>
>>>>>>>>>>> >>
>>>>>>>>>>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui
>>>>>>>>>>><ah...@adobe.com>
>>>>>>>>>>>wrote:
>>>>>>>>>>> >>> Reviving this thread...
>>>>>>>>>>> >>>
>>>>>>>>>>> >>> Peter says he wants to test to see if an object implements
>>>>>>>>>>>an
>>>>>>>>>>> >>>interface at
>>>>>>>>>>> >>> runtime. What mechanism do we want to use?
>>>>>>>>>>> >>>
>>>>>>>>>>> >>> I don't think we need to make instanceof work, just have
>>>>>>>>>>>some
>>>>>>>>>>>test
>>>>>>>>>>>to
>>>>>>>>>>> >>>call.
>>>>>>>>>>> >>>
>>>>>>>>>>> >>> -Alex
>>>>>>>>>>> >>>
>>>>>>>>>>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl>
>>>>>>>>>>>wrote:
>>>>>>>>>>> >>>
>>>>>>>>>>> >>>>When using interfaces for type checking, there are two
>>>>>>>>>>>'kinds':
>>>>>>>>>>>at
>>>>>>>>>>> >>>>compilation and at runtime.
>>>>>>>>>>> >>>>
>>>>>>>>>>> >>>>The @interface and @implements annotations are for compile
>>>>>>>>>>>time
>>>>>>>>>>> >>>>checking.
>>>>>>>>>>> >>>>
>>>>>>>>>>> >>>>For runtime checking comes in two flavours: 'instanceof' and
>>>>>>>>>>>'is'.
>>>>>>>>>>> >>>>
>>>>>>>>>>> >>>>Our method of setting up inheritance (goog.inherits)
>>>>>>>>>>>maintains
>>>>>>>>>>>the
>>>>>>>>>>> >>>>inheritance chain, so 'instanceof' works out of the box.
>>>>>>>>>>> >>>>
>>>>>>>>>>> >>>>The work starts with 'is'. We want to story the 'extends'
>>>>>>>>>>>and
>>>>>>>>>>> >>>>'implements' metadata from AS in the JS classes and create a
>>>>>>>>>>>method to
>>>>>>>>>>> >>>>test against that metadata set. I have a pretty good idea on
>>>>>>>>>>>how
>>>>>>>>>>>to
>>>>>>>>>>> >>>>implement such a beast, but it will require some (ha!)
>>>>>>>>>>>tinkering
>>>>>>>>>>>with
>>>>>>>>>>> >>>>the FlexJS JS framework and FalconJx. That will take some
>>>>>>>>>>>time...
>>>>>>>>>>> >>>>
>>>>>>>>>>> >>>>EdB
>>>>>>>>>>> >>>>
>>>>>>>>>>> >>>>
>>>>>>>>>>> >>>>
>>>>>>>>>>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>>>>>>>>>> >>>><bi...@gmail.com> wrote:
>>>>>>>>>>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui
>>>>>>>>>>><ah...@adobe.com>
>>>>>>>>>>> >>>>>wrote:
>>>>>>>>>>> >>>>>
>>>>>>>>>>> >>>>>> I think FalconJS was going to generate something like:
>>>>>>>>>>> >>>>>>
>>>>>>>>>>> >>>>>> if (child != undefined &&
>>>>>>>>>>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>>>>>>>> >>>>>>
>>>>>>>>>>> >>>>>> Not sure what it was going to do for classes, maybe chase
>>>>>>>>>>>the
>>>>>>>>>>> >>>>>>prototype
>>>>>>>>>>> >>>>>> chain?
>>>>>>>>>>> >>>>>>
>>>>>>>>>>> >>>>>> The other thing that occurred to me about $implements or
>>>>>>>>>>> >>>>>>child.is(IChrome)
>>>>>>>>>>> >>>>>> is that all objects must then have these properties or
>>>>>>>>>>>functions
>>>>>>>>>>> >>>>>>where
>>>>>>>>>>> >>>>>>the
>>>>>>>>>>> >>>>>> global function
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Ix Multimedia Software
>>>>>>>>>>
>>>>>>>>>> Jan Luykenstraat 27
>>>>>>>>>> 3521 VB Utrecht
>>>>>>>>>>
>>>>>>>>>> T. 06-51952295
>>>>>>>>>> I. www.ixsoftware.nl
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>--
>>>>>>>>>Ix Multimedia Software
>>>>>>>>>
>>>>>>>>>Jan Luykenstraat 27
>>>>>>>>>3521 VB Utrecht
>>>>>>>>>
>>>>>>>>>T. 06-51952295
>>>>>>>>>I. www.ixsoftware.nl
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>--
>>>>>>>Ix Multimedia Software
>>>>>>>
>>>>>>>Jan Luykenstraat 27
>>>>>>>3521 VB Utrecht
>>>>>>>
>>>>>>>T. 06-51952295
>>>>>>>I. www.ixsoftware.nl
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>Ix Multimedia Software
>>>>>
>>>>>Jan Luykenstraat 27
>>>>>3521 VB Utrecht
>>>>>
>>>>>T. 06-51952295
>>>>>I. www.ixsoftware.nl
>>>>
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>
>>
>>
>>--
>>Ix Multimedia Software
>>
>>Jan Luykenstraat 27
>>3521 VB Utrecht
>>
>>T. 06-51952295
>>I. www.ixsoftware.nl
>
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Alex Harui <ah...@adobe.com>.
It's been so long since I've seen that, that I don't completely remember.
I believe it could be a Java class path issue. That the compiler is
picking up an different version of MapMaker than expected.
-Alex
On 10/31/13 9:58 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>And I killed it again... Now I'm getting this (vaguely familiar) error:
>
>Using Falcon codebase:
>/Users/erik/Documents/ApacheFlex/git/flex-falcon/compiler.jx/bin/../../com
>piler
>Using Flex SDK: /Users/erik/Desktop/OverlayedSDK
>Exception in thread "main" java.lang.IllegalAccessError: tried to
>access method
>com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/bas
>e/Function;)Ljava/util/concurrent/ConcurrentMap;
>from class org.apache.flex.compiler.internal.projects.CompilerProject
>at
>org.apache.flex.compiler.internal.projects.CompilerProject.<init>(Compiler
>Project.java:114)
>at
>org.apache.flex.compiler.internal.projects.ASProject.<init>(ASProject.java
>:71)
>at
>org.apache.flex.compiler.internal.projects.FlexProject.<init>(FlexProject.
>java:109)
>at
>org.apache.flex.compiler.internal.projects.FlexProject.<init>(FlexProject.
>java:129)
>at
>org.apache.flex.compiler.internal.projects.FlexJSProject.<init>(FlexJSProj
>ect.java:48)
>at org.apache.flex.compiler.clients.MXMLJSC.<init>(MXMLJSC.java:198)
>at org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC.java:171)
>
>Remind me, how do I fix this?
>
>EdB
>
>
>
>On Thu, Oct 31, 2013 at 3:09 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
>> Basically, I'm complaining it's getting too hard to develop for this,
>> but I guess that's to be expected at this stage.
>>
>> It's up and running now.
>>
>> EdB
>>
>>
>>
>> On Thu, Oct 31, 2013 at 2:33 PM, Alex Harui <ah...@adobe.com> wrote:
>>> Not sure what you're asking. There isn't any Adobe code in there. The
>>> zip contains binaries so it can't go in the repo. The sh/bat files in
>>>the
>>> zip are not in the repo because I keep hoping they will go away someday
>>> and be replaced by an installer.
>>>
>>> -Alex
>>>
>>> On 10/31/13 6:30 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>
>>>>Ok... is that proprietary code, or just not in the repo yet?
>>>>
>>>>EdB
>>>>
>>>>
>>>>
>>>>On Thu, Oct 31, 2013 at 2:26 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>> By using the FlexJSOverlay.zip on my people.a.o folder. Instructions
>>>>>are
>>>>> available at
>>>>>
>>>>>https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Ado
>>>>>be+
>>>>>Fl
>>>>> ash+Builder
>>>>>
>>>>> -Alex
>>>>>
>>>>> On 10/31/13 6:20 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>
>>>>>>And how does one 'overlay' an SDK?
>>>>>>
>>>>>>EdB
>>>>>>
>>>>>>
>>>>>>
>>>>>>On Thu, Oct 31, 2013 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>>> I've been testing against DataBindingTest whose sources are up on
>>>>>>>my
>>>>>>> people.a.o folder, so maybe this doesn't build anymore, but the
>>>>>>>console
>>>>>>> output looks like you are referencing a full Apache Flex SDK
>>>>>>>instead
>>>>>>>of
>>>>>>> one that is overlaid, which might cause the compiler to find CSS
>>>>>>>files
>>>>>>>in
>>>>>>> a whole bunch of SWCs that we don't currently handle.
>>>>>>>
>>>>>>> IOW, you can't just add FlexJSUI.swc to an existing SDK, it has to
>>>>>>>be
>>>>>>> "overlaid" which neuters some things in an Apache Flex SDK.
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>> On 10/31/13 5:29 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>>
>>>>>>>>Hi,
>>>>>>>>
>>>>>>>>I'm busy building support for the "is" and "as" operators into
>>>>>>>>FlexJS.
>>>>>>>>Now, first I thought I'd try to compile the FlexJSTest_again
>>>>>>>>example.
>>>>>>>>To my suprise, I get an error:
>>>>>>>>
>>>>>>>>CSS codegen problem. Reason: 'Unable to find compilation unit for
>>>>>>>>Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
>>>>>>>>
>>>>>>>>The error seems to originate from FalconJx, it is thrown in
>>>>>>>>JSCSSCompilationSession.java... Now, my sources are fresh, I've
>>>>>>>>rebuild the SDK (super-clean main), all compiler projects (wipe
>>>>>>>>main)
>>>>>>>>and the FlexUI.swc. Am I missing something (command line arg) or is
>>>>>>>>there some source not yet committed or something more obvious I'm
>>>>>>>>overlooking?
>>>>>>>>
>>>>>>>>These are my arguments:
>>>>>>>>
>>>>>>>>+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependencie
>>>>>>>>s/P
>>>>>>>>la
>>>>>>>>ye
>>>>>>>>rGlobal/player
>>>>>>>>+playerglobal.version=11.1
>>>>>>>>-load-config="/Applications/Adobe Flash Builder
>>>>>>>>4.7/sdks/4.10.0/frameworks/flex-config.xml"
>>>>>>>>-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frame
>>>>>>>>wor
>>>>>>>>ks
>>>>>>>>/a
>>>>>>>>s/libs/FlexJSUI.swc
>>>>>>>>-js-output-type=FLEXJS
>>>>>>>>-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/GoogleCl
>>>>>>>>osu
>>>>>>>>re
>>>>>>>>/l
>>>>>>>>ibrary
>>>>>>>>-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/framewor
>>>>>>>>ks/
>>>>>>>>js
>>>>>>>>/F
>>>>>>>>lexJS/src
>>>>>>>>/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTest_
>>>>>>>>aga
>>>>>>>>in
>>>>>>>>/s
>>>>>>>>rc/FlexJSTest_again.mxml
>>>>>>>>
>>>>>>>>EdB
>>>>>>>>
>>>>>>>>
>>>>>>>>On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin <er...@ixsoftware.nl>
>>>>>>>>wrote:
>>>>>>>>> I'll have a look at it today.
>>>>>>>>>
>>>>>>>>> EdB
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wednesday, October 30, 2013, Peter Ent wrote:
>>>>>>>>>>
>>>>>>>>>> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces
>>>>>>>>>>so
>>>>>>>>>>we'll
>>>>>>>>>> have to find a reasonable solution for this. We've managed to
>>>>>>>>>>avoid
>>>>>>>>>>the
>>>>>>>>>> situation in JavaScript but it is coming up quickly.
>>>>>>>>>>
>>>>>>>>>> --peter
>>>>>>>>>>
>>>>>>>>>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>>>>>
>>>>>>>>>> >Some guidance can be found here [1] and here [2].
>>>>>>>>>> >
>>>>>>>>>> >EdB
>>>>>>>>>> >
>>>>>>>>>> >1:
>>>>>>>>>>
>>>>>>>>>> >
>>>>>>>>>>>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-i
>>>>>>>>>>>nte
>>>>>>>>>>>rf
>>>>>>>>>>>ac
>>>>>>>>>>>es-
>>>>>>>>>> >packages-and-namespaces/
>>>>>>>>>> >2:
>>>>>>>>>>
>>>>>>>>>> >
>>>>>>>>>>>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+
>>>>>>>>>>>lan
>>>>>>>>>>>gu
>>>>>>>>>>>ag
>>>>>>>>>>>e+f
>>>>>>>>>> >eatures+in+JavaScript+using+AMD+and+ES5
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin
>>>>>>>>>><er...@ixsoftware.nl>
>>>>>>>>>> > wrote:
>>>>>>>>>> >> "instanceof" doesn't check if an interface is implemented,
>>>>>>>>>>neither
>>>>>>>>>>in
>>>>>>>>>> >> Flex nor using Closure inheritance in JavaScript. What we
>>>>>>>>>>need
>>>>>>>>>>for
>>>>>>>>>> >> runtime checking of interface implementation is an global
>>>>>>>>>>"is"
>>>>>>>>>> >> function... I think I taught FalconJx to translate "ClassA is
>>>>>>>>>>ClassB"
>>>>>>>>>> >> as "is(ClassA, ClassB)". All we need to do now is to
>>>>>>>>>>implement a
>>>>>>>>>> >> global "is()" function and somehow teach the compiler to keep
>>>>>>>>>>track
>>>>>>>>>>of
>>>>>>>>>> >> which classes implement which interfaces - all the way up the
>>>>>>>>>>chain
>>>>>>>>>> >> and sideways (interfaces can implement interfaces).
>>>>>>>>>> >>
>>>>>>>>>> >> EdB
>>>>>>>>>> >>
>>>>>>>>>> >>
>>>>>>>>>> >>
>>>>>>>>>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui
>>>>>>>>>><ah...@adobe.com>
>>>>>>>>>>wrote:
>>>>>>>>>> >>> Reviving this thread...
>>>>>>>>>> >>>
>>>>>>>>>> >>> Peter says he wants to test to see if an object implements
>>>>>>>>>>an
>>>>>>>>>> >>>interface at
>>>>>>>>>> >>> runtime. What mechanism do we want to use?
>>>>>>>>>> >>>
>>>>>>>>>> >>> I don't think we need to make instanceof work, just have
>>>>>>>>>>some
>>>>>>>>>>test
>>>>>>>>>>to
>>>>>>>>>> >>>call.
>>>>>>>>>> >>>
>>>>>>>>>> >>> -Alex
>>>>>>>>>> >>>
>>>>>>>>>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl>
>>>>>>>>>>wrote:
>>>>>>>>>> >>>
>>>>>>>>>> >>>>When using interfaces for type checking, there are two
>>>>>>>>>>'kinds':
>>>>>>>>>>at
>>>>>>>>>> >>>>compilation and at runtime.
>>>>>>>>>> >>>>
>>>>>>>>>> >>>>The @interface and @implements annotations are for compile
>>>>>>>>>>time
>>>>>>>>>> >>>>checking.
>>>>>>>>>> >>>>
>>>>>>>>>> >>>>For runtime checking comes in two flavours: 'instanceof' and
>>>>>>>>>>'is'.
>>>>>>>>>> >>>>
>>>>>>>>>> >>>>Our method of setting up inheritance (goog.inherits)
>>>>>>>>>>maintains
>>>>>>>>>>the
>>>>>>>>>> >>>>inheritance chain, so 'instanceof' works out of the box.
>>>>>>>>>> >>>>
>>>>>>>>>> >>>>The work starts with 'is'. We want to story the 'extends'
>>>>>>>>>>and
>>>>>>>>>> >>>>'implements' metadata from AS in the JS classes and create a
>>>>>>>>>>method to
>>>>>>>>>> >>>>test against that metadata set. I have a pretty good idea on
>>>>>>>>>>how
>>>>>>>>>>to
>>>>>>>>>> >>>>implement such a beast, but it will require some (ha!)
>>>>>>>>>>tinkering
>>>>>>>>>>with
>>>>>>>>>> >>>>the FlexJS JS framework and FalconJx. That will take some
>>>>>>>>>>time...
>>>>>>>>>> >>>>
>>>>>>>>>> >>>>EdB
>>>>>>>>>> >>>>
>>>>>>>>>> >>>>
>>>>>>>>>> >>>>
>>>>>>>>>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>>>>>>>>> >>>><bi...@gmail.com> wrote:
>>>>>>>>>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui
>>>>>>>>>><ah...@adobe.com>
>>>>>>>>>> >>>>>wrote:
>>>>>>>>>> >>>>>
>>>>>>>>>> >>>>>> I think FalconJS was going to generate something like:
>>>>>>>>>> >>>>>>
>>>>>>>>>> >>>>>> if (child != undefined &&
>>>>>>>>>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>>>>>>> >>>>>>
>>>>>>>>>> >>>>>> Not sure what it was going to do for classes, maybe chase
>>>>>>>>>>the
>>>>>>>>>> >>>>>>prototype
>>>>>>>>>> >>>>>> chain?
>>>>>>>>>> >>>>>>
>>>>>>>>>> >>>>>> The other thing that occurred to me about $implements or
>>>>>>>>>> >>>>>>child.is(IChrome)
>>>>>>>>>> >>>>>> is that all objects must then have these properties or
>>>>>>>>>>functions
>>>>>>>>>> >>>>>>where
>>>>>>>>>> >>>>>>the
>>>>>>>>>> >>>>>> global function
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Ix Multimedia Software
>>>>>>>>>
>>>>>>>>> Jan Luykenstraat 27
>>>>>>>>> 3521 VB Utrecht
>>>>>>>>>
>>>>>>>>> T. 06-51952295
>>>>>>>>> I. www.ixsoftware.nl
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>--
>>>>>>>>Ix Multimedia Software
>>>>>>>>
>>>>>>>>Jan Luykenstraat 27
>>>>>>>>3521 VB Utrecht
>>>>>>>>
>>>>>>>>T. 06-51952295
>>>>>>>>I. www.ixsoftware.nl
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>--
>>>>>>Ix Multimedia Software
>>>>>>
>>>>>>Jan Luykenstraat 27
>>>>>>3521 VB Utrecht
>>>>>>
>>>>>>T. 06-51952295
>>>>>>I. www.ixsoftware.nl
>>>>>
>>>>
>>>>
>>>>
>>>>--
>>>>Ix Multimedia Software
>>>>
>>>>Jan Luykenstraat 27
>>>>3521 VB Utrecht
>>>>
>>>>T. 06-51952295
>>>>I. www.ixsoftware.nl
>>>
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>
>
>
>--
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Erik de Bruin <er...@ixsoftware.nl>.
And I killed it again... Now I'm getting this (vaguely familiar) error:
Using Falcon codebase:
/Users/erik/Documents/ApacheFlex/git/flex-falcon/compiler.jx/bin/../../compiler
Using Flex SDK: /Users/erik/Desktop/OverlayedSDK
Exception in thread "main" java.lang.IllegalAccessError: tried to
access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap;
from class org.apache.flex.compiler.internal.projects.CompilerProject
at org.apache.flex.compiler.internal.projects.CompilerProject.<init>(CompilerProject.java:114)
at org.apache.flex.compiler.internal.projects.ASProject.<init>(ASProject.java:71)
at org.apache.flex.compiler.internal.projects.FlexProject.<init>(FlexProject.java:109)
at org.apache.flex.compiler.internal.projects.FlexProject.<init>(FlexProject.java:129)
at org.apache.flex.compiler.internal.projects.FlexJSProject.<init>(FlexJSProject.java:48)
at org.apache.flex.compiler.clients.MXMLJSC.<init>(MXMLJSC.java:198)
at org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC.java:171)
Remind me, how do I fix this?
EdB
On Thu, Oct 31, 2013 at 3:09 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
> Basically, I'm complaining it's getting too hard to develop for this,
> but I guess that's to be expected at this stage.
>
> It's up and running now.
>
> EdB
>
>
>
> On Thu, Oct 31, 2013 at 2:33 PM, Alex Harui <ah...@adobe.com> wrote:
>> Not sure what you're asking. There isn't any Adobe code in there. The
>> zip contains binaries so it can't go in the repo. The sh/bat files in the
>> zip are not in the repo because I keep hoping they will go away someday
>> and be replaced by an installer.
>>
>> -Alex
>>
>> On 10/31/13 6:30 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>
>>>Ok... is that proprietary code, or just not in the repo yet?
>>>
>>>EdB
>>>
>>>
>>>
>>>On Thu, Oct 31, 2013 at 2:26 PM, Alex Harui <ah...@adobe.com> wrote:
>>>> By using the FlexJSOverlay.zip on my people.a.o folder. Instructions
>>>>are
>>>> available at
>>>>
>>>>https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+
>>>>Fl
>>>> ash+Builder
>>>>
>>>> -Alex
>>>>
>>>> On 10/31/13 6:20 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>
>>>>>And how does one 'overlay' an SDK?
>>>>>
>>>>>EdB
>>>>>
>>>>>
>>>>>
>>>>>On Thu, Oct 31, 2013 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>> I've been testing against DataBindingTest whose sources are up on my
>>>>>> people.a.o folder, so maybe this doesn't build anymore, but the
>>>>>>console
>>>>>> output looks like you are referencing a full Apache Flex SDK instead
>>>>>>of
>>>>>> one that is overlaid, which might cause the compiler to find CSS files
>>>>>>in
>>>>>> a whole bunch of SWCs that we don't currently handle.
>>>>>>
>>>>>> IOW, you can't just add FlexJSUI.swc to an existing SDK, it has to be
>>>>>> "overlaid" which neuters some things in an Apache Flex SDK.
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>> On 10/31/13 5:29 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>
>>>>>>>Hi,
>>>>>>>
>>>>>>>I'm busy building support for the "is" and "as" operators into FlexJS.
>>>>>>>Now, first I thought I'd try to compile the FlexJSTest_again example.
>>>>>>>To my suprise, I get an error:
>>>>>>>
>>>>>>>CSS codegen problem. Reason: 'Unable to find compilation unit for
>>>>>>>Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
>>>>>>>
>>>>>>>The error seems to originate from FalconJx, it is thrown in
>>>>>>>JSCSSCompilationSession.java... Now, my sources are fresh, I've
>>>>>>>rebuild the SDK (super-clean main), all compiler projects (wipe main)
>>>>>>>and the FlexUI.swc. Am I missing something (command line arg) or is
>>>>>>>there some source not yet committed or something more obvious I'm
>>>>>>>overlooking?
>>>>>>>
>>>>>>>These are my arguments:
>>>>>>>
>>>>>>>+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependencies/P
>>>>>>>la
>>>>>>>ye
>>>>>>>rGlobal/player
>>>>>>>+playerglobal.version=11.1
>>>>>>>-load-config="/Applications/Adobe Flash Builder
>>>>>>>4.7/sdks/4.10.0/frameworks/flex-config.xml"
>>>>>>>-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/framewor
>>>>>>>ks
>>>>>>>/a
>>>>>>>s/libs/FlexJSUI.swc
>>>>>>>-js-output-type=FLEXJS
>>>>>>>-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosu
>>>>>>>re
>>>>>>>/l
>>>>>>>ibrary
>>>>>>>-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/
>>>>>>>js
>>>>>>>/F
>>>>>>>lexJS/src
>>>>>>>/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTest_aga
>>>>>>>in
>>>>>>>/s
>>>>>>>rc/FlexJSTest_again.mxml
>>>>>>>
>>>>>>>EdB
>>>>>>>
>>>>>>>
>>>>>>>On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin <er...@ixsoftware.nl>
>>>>>>>wrote:
>>>>>>>> I'll have a look at it today.
>>>>>>>>
>>>>>>>> EdB
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wednesday, October 30, 2013, Peter Ent wrote:
>>>>>>>>>
>>>>>>>>> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces so
>>>>>>>>>we'll
>>>>>>>>> have to find a reasonable solution for this. We've managed to avoid
>>>>>>>>>the
>>>>>>>>> situation in JavaScript but it is coming up quickly.
>>>>>>>>>
>>>>>>>>> --peter
>>>>>>>>>
>>>>>>>>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>>>>
>>>>>>>>> >Some guidance can be found here [1] and here [2].
>>>>>>>>> >
>>>>>>>>> >EdB
>>>>>>>>> >
>>>>>>>>> >1:
>>>>>>>>>
>>>>>>>>> >
>>>>>>>>>>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-inte
>>>>>>>>>>rf
>>>>>>>>>>ac
>>>>>>>>>>es-
>>>>>>>>> >packages-and-namespaces/
>>>>>>>>> >2:
>>>>>>>>>
>>>>>>>>> >
>>>>>>>>>>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+lan
>>>>>>>>>>gu
>>>>>>>>>>ag
>>>>>>>>>>e+f
>>>>>>>>> >eatures+in+JavaScript+using+AMD+and+ES5
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin
>>>>>>>>><er...@ixsoftware.nl>
>>>>>>>>> > wrote:
>>>>>>>>> >> "instanceof" doesn't check if an interface is implemented,
>>>>>>>>>neither
>>>>>>>>>in
>>>>>>>>> >> Flex nor using Closure inheritance in JavaScript. What we need
>>>>>>>>>for
>>>>>>>>> >> runtime checking of interface implementation is an global "is"
>>>>>>>>> >> function... I think I taught FalconJx to translate "ClassA is
>>>>>>>>>ClassB"
>>>>>>>>> >> as "is(ClassA, ClassB)". All we need to do now is to implement a
>>>>>>>>> >> global "is()" function and somehow teach the compiler to keep
>>>>>>>>>track
>>>>>>>>>of
>>>>>>>>> >> which classes implement which interfaces - all the way up the
>>>>>>>>>chain
>>>>>>>>> >> and sideways (interfaces can implement interfaces).
>>>>>>>>> >>
>>>>>>>>> >> EdB
>>>>>>>>> >>
>>>>>>>>> >>
>>>>>>>>> >>
>>>>>>>>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com>
>>>>>>>>>wrote:
>>>>>>>>> >>> Reviving this thread...
>>>>>>>>> >>>
>>>>>>>>> >>> Peter says he wants to test to see if an object implements an
>>>>>>>>> >>>interface at
>>>>>>>>> >>> runtime. What mechanism do we want to use?
>>>>>>>>> >>>
>>>>>>>>> >>> I don't think we need to make instanceof work, just have some
>>>>>>>>>test
>>>>>>>>>to
>>>>>>>>> >>>call.
>>>>>>>>> >>>
>>>>>>>>> >>> -Alex
>>>>>>>>> >>>
>>>>>>>>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl>
>>>>>>>>>wrote:
>>>>>>>>> >>>
>>>>>>>>> >>>>When using interfaces for type checking, there are two 'kinds':
>>>>>>>>>at
>>>>>>>>> >>>>compilation and at runtime.
>>>>>>>>> >>>>
>>>>>>>>> >>>>The @interface and @implements annotations are for compile time
>>>>>>>>> >>>>checking.
>>>>>>>>> >>>>
>>>>>>>>> >>>>For runtime checking comes in two flavours: 'instanceof' and
>>>>>>>>>'is'.
>>>>>>>>> >>>>
>>>>>>>>> >>>>Our method of setting up inheritance (goog.inherits) maintains
>>>>>>>>>the
>>>>>>>>> >>>>inheritance chain, so 'instanceof' works out of the box.
>>>>>>>>> >>>>
>>>>>>>>> >>>>The work starts with 'is'. We want to story the 'extends' and
>>>>>>>>> >>>>'implements' metadata from AS in the JS classes and create a
>>>>>>>>>method to
>>>>>>>>> >>>>test against that metadata set. I have a pretty good idea on
>>>>>>>>>how
>>>>>>>>>to
>>>>>>>>> >>>>implement such a beast, but it will require some (ha!)
>>>>>>>>>tinkering
>>>>>>>>>with
>>>>>>>>> >>>>the FlexJS JS framework and FalconJx. That will take some
>>>>>>>>>time...
>>>>>>>>> >>>>
>>>>>>>>> >>>>EdB
>>>>>>>>> >>>>
>>>>>>>>> >>>>
>>>>>>>>> >>>>
>>>>>>>>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>>>>>>>> >>>><bi...@gmail.com> wrote:
>>>>>>>>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui
>>>>>>>>><ah...@adobe.com>
>>>>>>>>> >>>>>wrote:
>>>>>>>>> >>>>>
>>>>>>>>> >>>>>> I think FalconJS was going to generate something like:
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>> if (child != undefined &&
>>>>>>>>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>> Not sure what it was going to do for classes, maybe chase
>>>>>>>>>the
>>>>>>>>> >>>>>>prototype
>>>>>>>>> >>>>>> chain?
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>> The other thing that occurred to me about $implements or
>>>>>>>>> >>>>>>child.is(IChrome)
>>>>>>>>> >>>>>> is that all objects must then have these properties or
>>>>>>>>>functions
>>>>>>>>> >>>>>>where
>>>>>>>>> >>>>>>the
>>>>>>>>> >>>>>> global function
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Ix Multimedia Software
>>>>>>>>
>>>>>>>> Jan Luykenstraat 27
>>>>>>>> 3521 VB Utrecht
>>>>>>>>
>>>>>>>> T. 06-51952295
>>>>>>>> I. www.ixsoftware.nl
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>--
>>>>>>>Ix Multimedia Software
>>>>>>>
>>>>>>>Jan Luykenstraat 27
>>>>>>>3521 VB Utrecht
>>>>>>>
>>>>>>>T. 06-51952295
>>>>>>>I. www.ixsoftware.nl
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>Ix Multimedia Software
>>>>>
>>>>>Jan Luykenstraat 27
>>>>>3521 VB Utrecht
>>>>>
>>>>>T. 06-51952295
>>>>>I. www.ixsoftware.nl
>>>>
>>>
>>>
>>>
>>>--
>>>Ix Multimedia Software
>>>
>>>Jan Luykenstraat 27
>>>3521 VB Utrecht
>>>
>>>T. 06-51952295
>>>I. www.ixsoftware.nl
>>
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Basically, I'm complaining it's getting too hard to develop for this,
but I guess that's to be expected at this stage.
It's up and running now.
EdB
On Thu, Oct 31, 2013 at 2:33 PM, Alex Harui <ah...@adobe.com> wrote:
> Not sure what you're asking. There isn't any Adobe code in there. The
> zip contains binaries so it can't go in the repo. The sh/bat files in the
> zip are not in the repo because I keep hoping they will go away someday
> and be replaced by an installer.
>
> -Alex
>
> On 10/31/13 6:30 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>
>>Ok... is that proprietary code, or just not in the repo yet?
>>
>>EdB
>>
>>
>>
>>On Thu, Oct 31, 2013 at 2:26 PM, Alex Harui <ah...@adobe.com> wrote:
>>> By using the FlexJSOverlay.zip on my people.a.o folder. Instructions
>>>are
>>> available at
>>>
>>>https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+
>>>Fl
>>> ash+Builder
>>>
>>> -Alex
>>>
>>> On 10/31/13 6:20 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>
>>>>And how does one 'overlay' an SDK?
>>>>
>>>>EdB
>>>>
>>>>
>>>>
>>>>On Thu, Oct 31, 2013 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>> I've been testing against DataBindingTest whose sources are up on my
>>>>> people.a.o folder, so maybe this doesn't build anymore, but the
>>>>>console
>>>>> output looks like you are referencing a full Apache Flex SDK instead
>>>>>of
>>>>> one that is overlaid, which might cause the compiler to find CSS files
>>>>>in
>>>>> a whole bunch of SWCs that we don't currently handle.
>>>>>
>>>>> IOW, you can't just add FlexJSUI.swc to an existing SDK, it has to be
>>>>> "overlaid" which neuters some things in an Apache Flex SDK.
>>>>>
>>>>> -Alex
>>>>>
>>>>> On 10/31/13 5:29 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>
>>>>>>Hi,
>>>>>>
>>>>>>I'm busy building support for the "is" and "as" operators into FlexJS.
>>>>>>Now, first I thought I'd try to compile the FlexJSTest_again example.
>>>>>>To my suprise, I get an error:
>>>>>>
>>>>>>CSS codegen problem. Reason: 'Unable to find compilation unit for
>>>>>>Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
>>>>>>
>>>>>>The error seems to originate from FalconJx, it is thrown in
>>>>>>JSCSSCompilationSession.java... Now, my sources are fresh, I've
>>>>>>rebuild the SDK (super-clean main), all compiler projects (wipe main)
>>>>>>and the FlexUI.swc. Am I missing something (command line arg) or is
>>>>>>there some source not yet committed or something more obvious I'm
>>>>>>overlooking?
>>>>>>
>>>>>>These are my arguments:
>>>>>>
>>>>>>+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependencies/P
>>>>>>la
>>>>>>ye
>>>>>>rGlobal/player
>>>>>>+playerglobal.version=11.1
>>>>>>-load-config="/Applications/Adobe Flash Builder
>>>>>>4.7/sdks/4.10.0/frameworks/flex-config.xml"
>>>>>>-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/framewor
>>>>>>ks
>>>>>>/a
>>>>>>s/libs/FlexJSUI.swc
>>>>>>-js-output-type=FLEXJS
>>>>>>-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosu
>>>>>>re
>>>>>>/l
>>>>>>ibrary
>>>>>>-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/
>>>>>>js
>>>>>>/F
>>>>>>lexJS/src
>>>>>>/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTest_aga
>>>>>>in
>>>>>>/s
>>>>>>rc/FlexJSTest_again.mxml
>>>>>>
>>>>>>EdB
>>>>>>
>>>>>>
>>>>>>On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin <er...@ixsoftware.nl>
>>>>>>wrote:
>>>>>>> I'll have a look at it today.
>>>>>>>
>>>>>>> EdB
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, October 30, 2013, Peter Ent wrote:
>>>>>>>>
>>>>>>>> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces so
>>>>>>>>we'll
>>>>>>>> have to find a reasonable solution for this. We've managed to avoid
>>>>>>>>the
>>>>>>>> situation in JavaScript but it is coming up quickly.
>>>>>>>>
>>>>>>>> --peter
>>>>>>>>
>>>>>>>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>>>
>>>>>>>> >Some guidance can be found here [1] and here [2].
>>>>>>>> >
>>>>>>>> >EdB
>>>>>>>> >
>>>>>>>> >1:
>>>>>>>>
>>>>>>>> >
>>>>>>>>>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-inte
>>>>>>>>>rf
>>>>>>>>>ac
>>>>>>>>>es-
>>>>>>>> >packages-and-namespaces/
>>>>>>>> >2:
>>>>>>>>
>>>>>>>> >
>>>>>>>>>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+lan
>>>>>>>>>gu
>>>>>>>>>ag
>>>>>>>>>e+f
>>>>>>>> >eatures+in+JavaScript+using+AMD+and+ES5
>>>>>>>> >
>>>>>>>> >
>>>>>>>> >
>>>>>>>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin
>>>>>>>><er...@ixsoftware.nl>
>>>>>>>> > wrote:
>>>>>>>> >> "instanceof" doesn't check if an interface is implemented,
>>>>>>>>neither
>>>>>>>>in
>>>>>>>> >> Flex nor using Closure inheritance in JavaScript. What we need
>>>>>>>>for
>>>>>>>> >> runtime checking of interface implementation is an global "is"
>>>>>>>> >> function... I think I taught FalconJx to translate "ClassA is
>>>>>>>>ClassB"
>>>>>>>> >> as "is(ClassA, ClassB)". All we need to do now is to implement a
>>>>>>>> >> global "is()" function and somehow teach the compiler to keep
>>>>>>>>track
>>>>>>>>of
>>>>>>>> >> which classes implement which interfaces - all the way up the
>>>>>>>>chain
>>>>>>>> >> and sideways (interfaces can implement interfaces).
>>>>>>>> >>
>>>>>>>> >> EdB
>>>>>>>> >>
>>>>>>>> >>
>>>>>>>> >>
>>>>>>>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com>
>>>>>>>>wrote:
>>>>>>>> >>> Reviving this thread...
>>>>>>>> >>>
>>>>>>>> >>> Peter says he wants to test to see if an object implements an
>>>>>>>> >>>interface at
>>>>>>>> >>> runtime. What mechanism do we want to use?
>>>>>>>> >>>
>>>>>>>> >>> I don't think we need to make instanceof work, just have some
>>>>>>>>test
>>>>>>>>to
>>>>>>>> >>>call.
>>>>>>>> >>>
>>>>>>>> >>> -Alex
>>>>>>>> >>>
>>>>>>>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl>
>>>>>>>>wrote:
>>>>>>>> >>>
>>>>>>>> >>>>When using interfaces for type checking, there are two 'kinds':
>>>>>>>>at
>>>>>>>> >>>>compilation and at runtime.
>>>>>>>> >>>>
>>>>>>>> >>>>The @interface and @implements annotations are for compile time
>>>>>>>> >>>>checking.
>>>>>>>> >>>>
>>>>>>>> >>>>For runtime checking comes in two flavours: 'instanceof' and
>>>>>>>>'is'.
>>>>>>>> >>>>
>>>>>>>> >>>>Our method of setting up inheritance (goog.inherits) maintains
>>>>>>>>the
>>>>>>>> >>>>inheritance chain, so 'instanceof' works out of the box.
>>>>>>>> >>>>
>>>>>>>> >>>>The work starts with 'is'. We want to story the 'extends' and
>>>>>>>> >>>>'implements' metadata from AS in the JS classes and create a
>>>>>>>>method to
>>>>>>>> >>>>test against that metadata set. I have a pretty good idea on
>>>>>>>>how
>>>>>>>>to
>>>>>>>> >>>>implement such a beast, but it will require some (ha!)
>>>>>>>>tinkering
>>>>>>>>with
>>>>>>>> >>>>the FlexJS JS framework and FalconJx. That will take some
>>>>>>>>time...
>>>>>>>> >>>>
>>>>>>>> >>>>EdB
>>>>>>>> >>>>
>>>>>>>> >>>>
>>>>>>>> >>>>
>>>>>>>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>>>>>>> >>>><bi...@gmail.com> wrote:
>>>>>>>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui
>>>>>>>><ah...@adobe.com>
>>>>>>>> >>>>>wrote:
>>>>>>>> >>>>>
>>>>>>>> >>>>>> I think FalconJS was going to generate something like:
>>>>>>>> >>>>>>
>>>>>>>> >>>>>> if (child != undefined &&
>>>>>>>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>>>>> >>>>>>
>>>>>>>> >>>>>> Not sure what it was going to do for classes, maybe chase
>>>>>>>>the
>>>>>>>> >>>>>>prototype
>>>>>>>> >>>>>> chain?
>>>>>>>> >>>>>>
>>>>>>>> >>>>>> The other thing that occurred to me about $implements or
>>>>>>>> >>>>>>child.is(IChrome)
>>>>>>>> >>>>>> is that all objects must then have these properties or
>>>>>>>>functions
>>>>>>>> >>>>>>where
>>>>>>>> >>>>>>the
>>>>>>>> >>>>>> global function
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Ix Multimedia Software
>>>>>>>
>>>>>>> Jan Luykenstraat 27
>>>>>>> 3521 VB Utrecht
>>>>>>>
>>>>>>> T. 06-51952295
>>>>>>> I. www.ixsoftware.nl
>>>>>>
>>>>>>
>>>>>>
>>>>>>--
>>>>>>Ix Multimedia Software
>>>>>>
>>>>>>Jan Luykenstraat 27
>>>>>>3521 VB Utrecht
>>>>>>
>>>>>>T. 06-51952295
>>>>>>I. www.ixsoftware.nl
>>>>>
>>>>
>>>>
>>>>
>>>>--
>>>>Ix Multimedia Software
>>>>
>>>>Jan Luykenstraat 27
>>>>3521 VB Utrecht
>>>>
>>>>T. 06-51952295
>>>>I. www.ixsoftware.nl
>>>
>>
>>
>>
>>--
>>Ix Multimedia Software
>>
>>Jan Luykenstraat 27
>>3521 VB Utrecht
>>
>>T. 06-51952295
>>I. www.ixsoftware.nl
>
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Alex Harui <ah...@adobe.com>.
Not sure what you're asking. There isn't any Adobe code in there. The
zip contains binaries so it can't go in the repo. The sh/bat files in the
zip are not in the repo because I keep hoping they will go away someday
and be replaced by an installer.
-Alex
On 10/31/13 6:30 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>Ok... is that proprietary code, or just not in the repo yet?
>
>EdB
>
>
>
>On Thu, Oct 31, 2013 at 2:26 PM, Alex Harui <ah...@adobe.com> wrote:
>> By using the FlexJSOverlay.zip on my people.a.o folder. Instructions
>>are
>> available at
>>
>>https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+
>>Fl
>> ash+Builder
>>
>> -Alex
>>
>> On 10/31/13 6:20 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>
>>>And how does one 'overlay' an SDK?
>>>
>>>EdB
>>>
>>>
>>>
>>>On Thu, Oct 31, 2013 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>>>> I've been testing against DataBindingTest whose sources are up on my
>>>> people.a.o folder, so maybe this doesn't build anymore, but the
>>>>console
>>>> output looks like you are referencing a full Apache Flex SDK instead
>>>>of
>>>> one that is overlaid, which might cause the compiler to find CSS files
>>>>in
>>>> a whole bunch of SWCs that we don't currently handle.
>>>>
>>>> IOW, you can't just add FlexJSUI.swc to an existing SDK, it has to be
>>>> "overlaid" which neuters some things in an Apache Flex SDK.
>>>>
>>>> -Alex
>>>>
>>>> On 10/31/13 5:29 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>
>>>>>Hi,
>>>>>
>>>>>I'm busy building support for the "is" and "as" operators into FlexJS.
>>>>>Now, first I thought I'd try to compile the FlexJSTest_again example.
>>>>>To my suprise, I get an error:
>>>>>
>>>>>CSS codegen problem. Reason: 'Unable to find compilation unit for
>>>>>Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
>>>>>
>>>>>The error seems to originate from FalconJx, it is thrown in
>>>>>JSCSSCompilationSession.java... Now, my sources are fresh, I've
>>>>>rebuild the SDK (super-clean main), all compiler projects (wipe main)
>>>>>and the FlexUI.swc. Am I missing something (command line arg) or is
>>>>>there some source not yet committed or something more obvious I'm
>>>>>overlooking?
>>>>>
>>>>>These are my arguments:
>>>>>
>>>>>+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependencies/P
>>>>>la
>>>>>ye
>>>>>rGlobal/player
>>>>>+playerglobal.version=11.1
>>>>>-load-config="/Applications/Adobe Flash Builder
>>>>>4.7/sdks/4.10.0/frameworks/flex-config.xml"
>>>>>-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/framewor
>>>>>ks
>>>>>/a
>>>>>s/libs/FlexJSUI.swc
>>>>>-js-output-type=FLEXJS
>>>>>-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosu
>>>>>re
>>>>>/l
>>>>>ibrary
>>>>>-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/
>>>>>js
>>>>>/F
>>>>>lexJS/src
>>>>>/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTest_aga
>>>>>in
>>>>>/s
>>>>>rc/FlexJSTest_again.mxml
>>>>>
>>>>>EdB
>>>>>
>>>>>
>>>>>On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin <er...@ixsoftware.nl>
>>>>>wrote:
>>>>>> I'll have a look at it today.
>>>>>>
>>>>>> EdB
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wednesday, October 30, 2013, Peter Ent wrote:
>>>>>>>
>>>>>>> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces so
>>>>>>>we'll
>>>>>>> have to find a reasonable solution for this. We've managed to avoid
>>>>>>>the
>>>>>>> situation in JavaScript but it is coming up quickly.
>>>>>>>
>>>>>>> --peter
>>>>>>>
>>>>>>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>>
>>>>>>> >Some guidance can be found here [1] and here [2].
>>>>>>> >
>>>>>>> >EdB
>>>>>>> >
>>>>>>> >1:
>>>>>>>
>>>>>>> >
>>>>>>>>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-inte
>>>>>>>>rf
>>>>>>>>ac
>>>>>>>>es-
>>>>>>> >packages-and-namespaces/
>>>>>>> >2:
>>>>>>>
>>>>>>> >
>>>>>>>>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+lan
>>>>>>>>gu
>>>>>>>>ag
>>>>>>>>e+f
>>>>>>> >eatures+in+JavaScript+using+AMD+and+ES5
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin
>>>>>>><er...@ixsoftware.nl>
>>>>>>> > wrote:
>>>>>>> >> "instanceof" doesn't check if an interface is implemented,
>>>>>>>neither
>>>>>>>in
>>>>>>> >> Flex nor using Closure inheritance in JavaScript. What we need
>>>>>>>for
>>>>>>> >> runtime checking of interface implementation is an global "is"
>>>>>>> >> function... I think I taught FalconJx to translate "ClassA is
>>>>>>>ClassB"
>>>>>>> >> as "is(ClassA, ClassB)". All we need to do now is to implement a
>>>>>>> >> global "is()" function and somehow teach the compiler to keep
>>>>>>>track
>>>>>>>of
>>>>>>> >> which classes implement which interfaces - all the way up the
>>>>>>>chain
>>>>>>> >> and sideways (interfaces can implement interfaces).
>>>>>>> >>
>>>>>>> >> EdB
>>>>>>> >>
>>>>>>> >>
>>>>>>> >>
>>>>>>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com>
>>>>>>>wrote:
>>>>>>> >>> Reviving this thread...
>>>>>>> >>>
>>>>>>> >>> Peter says he wants to test to see if an object implements an
>>>>>>> >>>interface at
>>>>>>> >>> runtime. What mechanism do we want to use?
>>>>>>> >>>
>>>>>>> >>> I don't think we need to make instanceof work, just have some
>>>>>>>test
>>>>>>>to
>>>>>>> >>>call.
>>>>>>> >>>
>>>>>>> >>> -Alex
>>>>>>> >>>
>>>>>>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl>
>>>>>>>wrote:
>>>>>>> >>>
>>>>>>> >>>>When using interfaces for type checking, there are two 'kinds':
>>>>>>>at
>>>>>>> >>>>compilation and at runtime.
>>>>>>> >>>>
>>>>>>> >>>>The @interface and @implements annotations are for compile time
>>>>>>> >>>>checking.
>>>>>>> >>>>
>>>>>>> >>>>For runtime checking comes in two flavours: 'instanceof' and
>>>>>>>'is'.
>>>>>>> >>>>
>>>>>>> >>>>Our method of setting up inheritance (goog.inherits) maintains
>>>>>>>the
>>>>>>> >>>>inheritance chain, so 'instanceof' works out of the box.
>>>>>>> >>>>
>>>>>>> >>>>The work starts with 'is'. We want to story the 'extends' and
>>>>>>> >>>>'implements' metadata from AS in the JS classes and create a
>>>>>>>method to
>>>>>>> >>>>test against that metadata set. I have a pretty good idea on
>>>>>>>how
>>>>>>>to
>>>>>>> >>>>implement such a beast, but it will require some (ha!)
>>>>>>>tinkering
>>>>>>>with
>>>>>>> >>>>the FlexJS JS framework and FalconJx. That will take some
>>>>>>>time...
>>>>>>> >>>>
>>>>>>> >>>>EdB
>>>>>>> >>>>
>>>>>>> >>>>
>>>>>>> >>>>
>>>>>>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>>>>>> >>>><bi...@gmail.com> wrote:
>>>>>>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui
>>>>>>><ah...@adobe.com>
>>>>>>> >>>>>wrote:
>>>>>>> >>>>>
>>>>>>> >>>>>> I think FalconJS was going to generate something like:
>>>>>>> >>>>>>
>>>>>>> >>>>>> if (child != undefined &&
>>>>>>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>>>> >>>>>>
>>>>>>> >>>>>> Not sure what it was going to do for classes, maybe chase
>>>>>>>the
>>>>>>> >>>>>>prototype
>>>>>>> >>>>>> chain?
>>>>>>> >>>>>>
>>>>>>> >>>>>> The other thing that occurred to me about $implements or
>>>>>>> >>>>>>child.is(IChrome)
>>>>>>> >>>>>> is that all objects must then have these properties or
>>>>>>>functions
>>>>>>> >>>>>>where
>>>>>>> >>>>>>the
>>>>>>> >>>>>> global function
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Ix Multimedia Software
>>>>>>
>>>>>> Jan Luykenstraat 27
>>>>>> 3521 VB Utrecht
>>>>>>
>>>>>> T. 06-51952295
>>>>>> I. www.ixsoftware.nl
>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>Ix Multimedia Software
>>>>>
>>>>>Jan Luykenstraat 27
>>>>>3521 VB Utrecht
>>>>>
>>>>>T. 06-51952295
>>>>>I. www.ixsoftware.nl
>>>>
>>>
>>>
>>>
>>>--
>>>Ix Multimedia Software
>>>
>>>Jan Luykenstraat 27
>>>3521 VB Utrecht
>>>
>>>T. 06-51952295
>>>I. www.ixsoftware.nl
>>
>
>
>
>--
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Ok... is that proprietary code, or just not in the repo yet?
EdB
On Thu, Oct 31, 2013 at 2:26 PM, Alex Harui <ah...@adobe.com> wrote:
> By using the FlexJSOverlay.zip on my people.a.o folder. Instructions are
> available at
> https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+Fl
> ash+Builder
>
> -Alex
>
> On 10/31/13 6:20 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>
>>And how does one 'overlay' an SDK?
>>
>>EdB
>>
>>
>>
>>On Thu, Oct 31, 2013 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>>> I've been testing against DataBindingTest whose sources are up on my
>>> people.a.o folder, so maybe this doesn't build anymore, but the console
>>> output looks like you are referencing a full Apache Flex SDK instead of
>>> one that is overlaid, which might cause the compiler to find CSS files
>>>in
>>> a whole bunch of SWCs that we don't currently handle.
>>>
>>> IOW, you can't just add FlexJSUI.swc to an existing SDK, it has to be
>>> "overlaid" which neuters some things in an Apache Flex SDK.
>>>
>>> -Alex
>>>
>>> On 10/31/13 5:29 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>
>>>>Hi,
>>>>
>>>>I'm busy building support for the "is" and "as" operators into FlexJS.
>>>>Now, first I thought I'd try to compile the FlexJSTest_again example.
>>>>To my suprise, I get an error:
>>>>
>>>>CSS codegen problem. Reason: 'Unable to find compilation unit for
>>>>Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
>>>>
>>>>The error seems to originate from FalconJx, it is thrown in
>>>>JSCSSCompilationSession.java... Now, my sources are fresh, I've
>>>>rebuild the SDK (super-clean main), all compiler projects (wipe main)
>>>>and the FlexUI.swc. Am I missing something (command line arg) or is
>>>>there some source not yet committed or something more obvious I'm
>>>>overlooking?
>>>>
>>>>These are my arguments:
>>>>
>>>>+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependencies/Pla
>>>>ye
>>>>rGlobal/player
>>>>+playerglobal.version=11.1
>>>>-load-config="/Applications/Adobe Flash Builder
>>>>4.7/sdks/4.10.0/frameworks/flex-config.xml"
>>>>-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks
>>>>/a
>>>>s/libs/FlexJSUI.swc
>>>>-js-output-type=FLEXJS
>>>>-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure
>>>>/l
>>>>ibrary
>>>>-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/js
>>>>/F
>>>>lexJS/src
>>>>/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTest_again
>>>>/s
>>>>rc/FlexJSTest_again.mxml
>>>>
>>>>EdB
>>>>
>>>>
>>>>On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin <er...@ixsoftware.nl>
>>>>wrote:
>>>>> I'll have a look at it today.
>>>>>
>>>>> EdB
>>>>>
>>>>>
>>>>>
>>>>> On Wednesday, October 30, 2013, Peter Ent wrote:
>>>>>>
>>>>>> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces so
>>>>>>we'll
>>>>>> have to find a reasonable solution for this. We've managed to avoid
>>>>>>the
>>>>>> situation in JavaScript but it is coming up quickly.
>>>>>>
>>>>>> --peter
>>>>>>
>>>>>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>>
>>>>>> >Some guidance can be found here [1] and here [2].
>>>>>> >
>>>>>> >EdB
>>>>>> >
>>>>>> >1:
>>>>>>
>>>>>> >
>>>>>>>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-interf
>>>>>>>ac
>>>>>>>es-
>>>>>> >packages-and-namespaces/
>>>>>> >2:
>>>>>>
>>>>>> >
>>>>>>>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+langu
>>>>>>>ag
>>>>>>>e+f
>>>>>> >eatures+in+JavaScript+using+AMD+and+ES5
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin <er...@ixsoftware.nl>
>>>>>> > wrote:
>>>>>> >> "instanceof" doesn't check if an interface is implemented, neither
>>>>>>in
>>>>>> >> Flex nor using Closure inheritance in JavaScript. What we need for
>>>>>> >> runtime checking of interface implementation is an global "is"
>>>>>> >> function... I think I taught FalconJx to translate "ClassA is
>>>>>>ClassB"
>>>>>> >> as "is(ClassA, ClassB)". All we need to do now is to implement a
>>>>>> >> global "is()" function and somehow teach the compiler to keep
>>>>>>track
>>>>>>of
>>>>>> >> which classes implement which interfaces - all the way up the
>>>>>>chain
>>>>>> >> and sideways (interfaces can implement interfaces).
>>>>>> >>
>>>>>> >> EdB
>>>>>> >>
>>>>>> >>
>>>>>> >>
>>>>>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com>
>>>>>>wrote:
>>>>>> >>> Reviving this thread...
>>>>>> >>>
>>>>>> >>> Peter says he wants to test to see if an object implements an
>>>>>> >>>interface at
>>>>>> >>> runtime. What mechanism do we want to use?
>>>>>> >>>
>>>>>> >>> I don't think we need to make instanceof work, just have some
>>>>>>test
>>>>>>to
>>>>>> >>>call.
>>>>>> >>>
>>>>>> >>> -Alex
>>>>>> >>>
>>>>>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>> >>>
>>>>>> >>>>When using interfaces for type checking, there are two 'kinds':
>>>>>>at
>>>>>> >>>>compilation and at runtime.
>>>>>> >>>>
>>>>>> >>>>The @interface and @implements annotations are for compile time
>>>>>> >>>>checking.
>>>>>> >>>>
>>>>>> >>>>For runtime checking comes in two flavours: 'instanceof' and
>>>>>>'is'.
>>>>>> >>>>
>>>>>> >>>>Our method of setting up inheritance (goog.inherits) maintains
>>>>>>the
>>>>>> >>>>inheritance chain, so 'instanceof' works out of the box.
>>>>>> >>>>
>>>>>> >>>>The work starts with 'is'. We want to story the 'extends' and
>>>>>> >>>>'implements' metadata from AS in the JS classes and create a
>>>>>>method to
>>>>>> >>>>test against that metadata set. I have a pretty good idea on how
>>>>>>to
>>>>>> >>>>implement such a beast, but it will require some (ha!) tinkering
>>>>>>with
>>>>>> >>>>the FlexJS JS framework and FalconJx. That will take some time...
>>>>>> >>>>
>>>>>> >>>>EdB
>>>>>> >>>>
>>>>>> >>>>
>>>>>> >>>>
>>>>>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>>>>> >>>><bi...@gmail.com> wrote:
>>>>>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com>
>>>>>> >>>>>wrote:
>>>>>> >>>>>
>>>>>> >>>>>> I think FalconJS was going to generate something like:
>>>>>> >>>>>>
>>>>>> >>>>>> if (child != undefined &&
>>>>>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>>> >>>>>>
>>>>>> >>>>>> Not sure what it was going to do for classes, maybe chase the
>>>>>> >>>>>>prototype
>>>>>> >>>>>> chain?
>>>>>> >>>>>>
>>>>>> >>>>>> The other thing that occurred to me about $implements or
>>>>>> >>>>>>child.is(IChrome)
>>>>>> >>>>>> is that all objects must then have these properties or
>>>>>>functions
>>>>>> >>>>>>where
>>>>>> >>>>>>the
>>>>>> >>>>>> global function
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Ix Multimedia Software
>>>>>
>>>>> Jan Luykenstraat 27
>>>>> 3521 VB Utrecht
>>>>>
>>>>> T. 06-51952295
>>>>> I. www.ixsoftware.nl
>>>>
>>>>
>>>>
>>>>--
>>>>Ix Multimedia Software
>>>>
>>>>Jan Luykenstraat 27
>>>>3521 VB Utrecht
>>>>
>>>>T. 06-51952295
>>>>I. www.ixsoftware.nl
>>>
>>
>>
>>
>>--
>>Ix Multimedia Software
>>
>>Jan Luykenstraat 27
>>3521 VB Utrecht
>>
>>T. 06-51952295
>>I. www.ixsoftware.nl
>
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Alex Harui <ah...@adobe.com>.
By using the FlexJSOverlay.zip on my people.a.o folder. Instructions are
available at
https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+Fl
ash+Builder
-Alex
On 10/31/13 6:20 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>And how does one 'overlay' an SDK?
>
>EdB
>
>
>
>On Thu, Oct 31, 2013 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>> I've been testing against DataBindingTest whose sources are up on my
>> people.a.o folder, so maybe this doesn't build anymore, but the console
>> output looks like you are referencing a full Apache Flex SDK instead of
>> one that is overlaid, which might cause the compiler to find CSS files
>>in
>> a whole bunch of SWCs that we don't currently handle.
>>
>> IOW, you can't just add FlexJSUI.swc to an existing SDK, it has to be
>> "overlaid" which neuters some things in an Apache Flex SDK.
>>
>> -Alex
>>
>> On 10/31/13 5:29 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>
>>>Hi,
>>>
>>>I'm busy building support for the "is" and "as" operators into FlexJS.
>>>Now, first I thought I'd try to compile the FlexJSTest_again example.
>>>To my suprise, I get an error:
>>>
>>>CSS codegen problem. Reason: 'Unable to find compilation unit for
>>>Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
>>>
>>>The error seems to originate from FalconJx, it is thrown in
>>>JSCSSCompilationSession.java... Now, my sources are fresh, I've
>>>rebuild the SDK (super-clean main), all compiler projects (wipe main)
>>>and the FlexUI.swc. Am I missing something (command line arg) or is
>>>there some source not yet committed or something more obvious I'm
>>>overlooking?
>>>
>>>These are my arguments:
>>>
>>>+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependencies/Pla
>>>ye
>>>rGlobal/player
>>>+playerglobal.version=11.1
>>>-load-config="/Applications/Adobe Flash Builder
>>>4.7/sdks/4.10.0/frameworks/flex-config.xml"
>>>-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks
>>>/a
>>>s/libs/FlexJSUI.swc
>>>-js-output-type=FLEXJS
>>>-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure
>>>/l
>>>ibrary
>>>-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/js
>>>/F
>>>lexJS/src
>>>/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTest_again
>>>/s
>>>rc/FlexJSTest_again.mxml
>>>
>>>EdB
>>>
>>>
>>>On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin <er...@ixsoftware.nl>
>>>wrote:
>>>> I'll have a look at it today.
>>>>
>>>> EdB
>>>>
>>>>
>>>>
>>>> On Wednesday, October 30, 2013, Peter Ent wrote:
>>>>>
>>>>> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces so
>>>>>we'll
>>>>> have to find a reasonable solution for this. We've managed to avoid
>>>>>the
>>>>> situation in JavaScript but it is coming up quickly.
>>>>>
>>>>> --peter
>>>>>
>>>>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>
>>>>> >Some guidance can be found here [1] and here [2].
>>>>> >
>>>>> >EdB
>>>>> >
>>>>> >1:
>>>>>
>>>>> >
>>>>>>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-interf
>>>>>>ac
>>>>>>es-
>>>>> >packages-and-namespaces/
>>>>> >2:
>>>>>
>>>>> >
>>>>>>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+langu
>>>>>>ag
>>>>>>e+f
>>>>> >eatures+in+JavaScript+using+AMD+and+ES5
>>>>> >
>>>>> >
>>>>> >
>>>>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin <er...@ixsoftware.nl>
>>>>> > wrote:
>>>>> >> "instanceof" doesn't check if an interface is implemented, neither
>>>>>in
>>>>> >> Flex nor using Closure inheritance in JavaScript. What we need for
>>>>> >> runtime checking of interface implementation is an global "is"
>>>>> >> function... I think I taught FalconJx to translate "ClassA is
>>>>>ClassB"
>>>>> >> as "is(ClassA, ClassB)". All we need to do now is to implement a
>>>>> >> global "is()" function and somehow teach the compiler to keep
>>>>>track
>>>>>of
>>>>> >> which classes implement which interfaces - all the way up the
>>>>>chain
>>>>> >> and sideways (interfaces can implement interfaces).
>>>>> >>
>>>>> >> EdB
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com>
>>>>>wrote:
>>>>> >>> Reviving this thread...
>>>>> >>>
>>>>> >>> Peter says he wants to test to see if an object implements an
>>>>> >>>interface at
>>>>> >>> runtime. What mechanism do we want to use?
>>>>> >>>
>>>>> >>> I don't think we need to make instanceof work, just have some
>>>>>test
>>>>>to
>>>>> >>>call.
>>>>> >>>
>>>>> >>> -Alex
>>>>> >>>
>>>>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>> >>>
>>>>> >>>>When using interfaces for type checking, there are two 'kinds':
>>>>>at
>>>>> >>>>compilation and at runtime.
>>>>> >>>>
>>>>> >>>>The @interface and @implements annotations are for compile time
>>>>> >>>>checking.
>>>>> >>>>
>>>>> >>>>For runtime checking comes in two flavours: 'instanceof' and
>>>>>'is'.
>>>>> >>>>
>>>>> >>>>Our method of setting up inheritance (goog.inherits) maintains
>>>>>the
>>>>> >>>>inheritance chain, so 'instanceof' works out of the box.
>>>>> >>>>
>>>>> >>>>The work starts with 'is'. We want to story the 'extends' and
>>>>> >>>>'implements' metadata from AS in the JS classes and create a
>>>>>method to
>>>>> >>>>test against that metadata set. I have a pretty good idea on how
>>>>>to
>>>>> >>>>implement such a beast, but it will require some (ha!) tinkering
>>>>>with
>>>>> >>>>the FlexJS JS framework and FalconJx. That will take some time...
>>>>> >>>>
>>>>> >>>>EdB
>>>>> >>>>
>>>>> >>>>
>>>>> >>>>
>>>>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>>>> >>>><bi...@gmail.com> wrote:
>>>>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com>
>>>>> >>>>>wrote:
>>>>> >>>>>
>>>>> >>>>>> I think FalconJS was going to generate something like:
>>>>> >>>>>>
>>>>> >>>>>> if (child != undefined &&
>>>>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>> >>>>>>
>>>>> >>>>>> Not sure what it was going to do for classes, maybe chase the
>>>>> >>>>>>prototype
>>>>> >>>>>> chain?
>>>>> >>>>>>
>>>>> >>>>>> The other thing that occurred to me about $implements or
>>>>> >>>>>>child.is(IChrome)
>>>>> >>>>>> is that all objects must then have these properties or
>>>>>functions
>>>>> >>>>>>where
>>>>> >>>>>>the
>>>>> >>>>>> global function
>>>>
>>>>
>>>>
>>>> --
>>>> Ix Multimedia Software
>>>>
>>>> Jan Luykenstraat 27
>>>> 3521 VB Utrecht
>>>>
>>>> T. 06-51952295
>>>> I. www.ixsoftware.nl
>>>
>>>
>>>
>>>--
>>>Ix Multimedia Software
>>>
>>>Jan Luykenstraat 27
>>>3521 VB Utrecht
>>>
>>>T. 06-51952295
>>>I. www.ixsoftware.nl
>>
>
>
>
>--
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Erik de Bruin <er...@ixsoftware.nl>.
And how does one 'overlay' an SDK?
EdB
On Thu, Oct 31, 2013 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
> I've been testing against DataBindingTest whose sources are up on my
> people.a.o folder, so maybe this doesn't build anymore, but the console
> output looks like you are referencing a full Apache Flex SDK instead of
> one that is overlaid, which might cause the compiler to find CSS files in
> a whole bunch of SWCs that we don't currently handle.
>
> IOW, you can't just add FlexJSUI.swc to an existing SDK, it has to be
> "overlaid" which neuters some things in an Apache Flex SDK.
>
> -Alex
>
> On 10/31/13 5:29 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>
>>Hi,
>>
>>I'm busy building support for the "is" and "as" operators into FlexJS.
>>Now, first I thought I'd try to compile the FlexJSTest_again example.
>>To my suprise, I get an error:
>>
>>CSS codegen problem. Reason: 'Unable to find compilation unit for
>>Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
>>
>>The error seems to originate from FalconJx, it is thrown in
>>JSCSSCompilationSession.java... Now, my sources are fresh, I've
>>rebuild the SDK (super-clean main), all compiler projects (wipe main)
>>and the FlexUI.swc. Am I missing something (command line arg) or is
>>there some source not yet committed or something more obvious I'm
>>overlooking?
>>
>>These are my arguments:
>>
>>+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependencies/Playe
>>rGlobal/player
>>+playerglobal.version=11.1
>>-load-config="/Applications/Adobe Flash Builder
>>4.7/sdks/4.10.0/frameworks/flex-config.xml"
>>-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/a
>>s/libs/FlexJSUI.swc
>>-js-output-type=FLEXJS
>>-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/l
>>ibrary
>>-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/js/F
>>lexJS/src
>>/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTest_again/s
>>rc/FlexJSTest_again.mxml
>>
>>EdB
>>
>>
>>On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin <er...@ixsoftware.nl> wrote:
>>> I'll have a look at it today.
>>>
>>> EdB
>>>
>>>
>>>
>>> On Wednesday, October 30, 2013, Peter Ent wrote:
>>>>
>>>> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces so
>>>>we'll
>>>> have to find a reasonable solution for this. We've managed to avoid the
>>>> situation in JavaScript but it is coming up quickly.
>>>>
>>>> --peter
>>>>
>>>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>
>>>> >Some guidance can be found here [1] and here [2].
>>>> >
>>>> >EdB
>>>> >
>>>> >1:
>>>>
>>>> >
>>>>>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-interfac
>>>>>es-
>>>> >packages-and-namespaces/
>>>> >2:
>>>>
>>>> >
>>>>>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+languag
>>>>>e+f
>>>> >eatures+in+JavaScript+using+AMD+and+ES5
>>>> >
>>>> >
>>>> >
>>>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin <er...@ixsoftware.nl>
>>>> > wrote:
>>>> >> "instanceof" doesn't check if an interface is implemented, neither
>>>>in
>>>> >> Flex nor using Closure inheritance in JavaScript. What we need for
>>>> >> runtime checking of interface implementation is an global "is"
>>>> >> function... I think I taught FalconJx to translate "ClassA is
>>>>ClassB"
>>>> >> as "is(ClassA, ClassB)". All we need to do now is to implement a
>>>> >> global "is()" function and somehow teach the compiler to keep track
>>>>of
>>>> >> which classes implement which interfaces - all the way up the chain
>>>> >> and sideways (interfaces can implement interfaces).
>>>> >>
>>>> >> EdB
>>>> >>
>>>> >>
>>>> >>
>>>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com>
>>>>wrote:
>>>> >>> Reviving this thread...
>>>> >>>
>>>> >>> Peter says he wants to test to see if an object implements an
>>>> >>>interface at
>>>> >>> runtime. What mechanism do we want to use?
>>>> >>>
>>>> >>> I don't think we need to make instanceof work, just have some test
>>>>to
>>>> >>>call.
>>>> >>>
>>>> >>> -Alex
>>>> >>>
>>>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>> >>>
>>>> >>>>When using interfaces for type checking, there are two 'kinds': at
>>>> >>>>compilation and at runtime.
>>>> >>>>
>>>> >>>>The @interface and @implements annotations are for compile time
>>>> >>>>checking.
>>>> >>>>
>>>> >>>>For runtime checking comes in two flavours: 'instanceof' and 'is'.
>>>> >>>>
>>>> >>>>Our method of setting up inheritance (goog.inherits) maintains the
>>>> >>>>inheritance chain, so 'instanceof' works out of the box.
>>>> >>>>
>>>> >>>>The work starts with 'is'. We want to story the 'extends' and
>>>> >>>>'implements' metadata from AS in the JS classes and create a
>>>>method to
>>>> >>>>test against that metadata set. I have a pretty good idea on how to
>>>> >>>>implement such a beast, but it will require some (ha!) tinkering
>>>>with
>>>> >>>>the FlexJS JS framework and FalconJx. That will take some time...
>>>> >>>>
>>>> >>>>EdB
>>>> >>>>
>>>> >>>>
>>>> >>>>
>>>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>>> >>>><bi...@gmail.com> wrote:
>>>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com>
>>>> >>>>>wrote:
>>>> >>>>>
>>>> >>>>>> I think FalconJS was going to generate something like:
>>>> >>>>>>
>>>> >>>>>> if (child != undefined &&
>>>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>> >>>>>>
>>>> >>>>>> Not sure what it was going to do for classes, maybe chase the
>>>> >>>>>>prototype
>>>> >>>>>> chain?
>>>> >>>>>>
>>>> >>>>>> The other thing that occurred to me about $implements or
>>>> >>>>>>child.is(IChrome)
>>>> >>>>>> is that all objects must then have these properties or functions
>>>> >>>>>>where
>>>> >>>>>>the
>>>> >>>>>> global function
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>
>>
>>
>>--
>>Ix Multimedia Software
>>
>>Jan Luykenstraat 27
>>3521 VB Utrecht
>>
>>T. 06-51952295
>>I. www.ixsoftware.nl
>
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Alex Harui <ah...@adobe.com>.
I've been testing against DataBindingTest whose sources are up on my
people.a.o folder, so maybe this doesn't build anymore, but the console
output looks like you are referencing a full Apache Flex SDK instead of
one that is overlaid, which might cause the compiler to find CSS files in
a whole bunch of SWCs that we don't currently handle.
IOW, you can't just add FlexJSUI.swc to an existing SDK, it has to be
"overlaid" which neuters some things in an Apache Flex SDK.
-Alex
On 10/31/13 5:29 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>Hi,
>
>I'm busy building support for the "is" and "as" operators into FlexJS.
>Now, first I thought I'd try to compile the FlexJSTest_again example.
>To my suprise, I get an error:
>
>CSS codegen problem. Reason: 'Unable to find compilation unit for
>Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
>
>The error seems to originate from FalconJx, it is thrown in
>JSCSSCompilationSession.java... Now, my sources are fresh, I've
>rebuild the SDK (super-clean main), all compiler projects (wipe main)
>and the FlexUI.swc. Am I missing something (command line arg) or is
>there some source not yet committed or something more obvious I'm
>overlooking?
>
>These are my arguments:
>
>+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependencies/Playe
>rGlobal/player
>+playerglobal.version=11.1
>-load-config="/Applications/Adobe Flash Builder
>4.7/sdks/4.10.0/frameworks/flex-config.xml"
>-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/a
>s/libs/FlexJSUI.swc
>-js-output-type=FLEXJS
>-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/l
>ibrary
>-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/js/F
>lexJS/src
>/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTest_again/s
>rc/FlexJSTest_again.mxml
>
>EdB
>
>
>On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin <er...@ixsoftware.nl> wrote:
>> I'll have a look at it today.
>>
>> EdB
>>
>>
>>
>> On Wednesday, October 30, 2013, Peter Ent wrote:
>>>
>>> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces so
>>>we'll
>>> have to find a reasonable solution for this. We've managed to avoid the
>>> situation in JavaScript but it is coming up quickly.
>>>
>>> --peter
>>>
>>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>
>>> >Some guidance can be found here [1] and here [2].
>>> >
>>> >EdB
>>> >
>>> >1:
>>>
>>> >
>>>>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-interfac
>>>>es-
>>> >packages-and-namespaces/
>>> >2:
>>>
>>> >
>>>>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+languag
>>>>e+f
>>> >eatures+in+JavaScript+using+AMD+and+ES5
>>> >
>>> >
>>> >
>>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin <er...@ixsoftware.nl>
>>> > wrote:
>>> >> "instanceof" doesn't check if an interface is implemented, neither
>>>in
>>> >> Flex nor using Closure inheritance in JavaScript. What we need for
>>> >> runtime checking of interface implementation is an global "is"
>>> >> function... I think I taught FalconJx to translate "ClassA is
>>>ClassB"
>>> >> as "is(ClassA, ClassB)". All we need to do now is to implement a
>>> >> global "is()" function and somehow teach the compiler to keep track
>>>of
>>> >> which classes implement which interfaces - all the way up the chain
>>> >> and sideways (interfaces can implement interfaces).
>>> >>
>>> >> EdB
>>> >>
>>> >>
>>> >>
>>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com>
>>>wrote:
>>> >>> Reviving this thread...
>>> >>>
>>> >>> Peter says he wants to test to see if an object implements an
>>> >>>interface at
>>> >>> runtime. What mechanism do we want to use?
>>> >>>
>>> >>> I don't think we need to make instanceof work, just have some test
>>>to
>>> >>>call.
>>> >>>
>>> >>> -Alex
>>> >>>
>>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>> >>>
>>> >>>>When using interfaces for type checking, there are two 'kinds': at
>>> >>>>compilation and at runtime.
>>> >>>>
>>> >>>>The @interface and @implements annotations are for compile time
>>> >>>>checking.
>>> >>>>
>>> >>>>For runtime checking comes in two flavours: 'instanceof' and 'is'.
>>> >>>>
>>> >>>>Our method of setting up inheritance (goog.inherits) maintains the
>>> >>>>inheritance chain, so 'instanceof' works out of the box.
>>> >>>>
>>> >>>>The work starts with 'is'. We want to story the 'extends' and
>>> >>>>'implements' metadata from AS in the JS classes and create a
>>>method to
>>> >>>>test against that metadata set. I have a pretty good idea on how to
>>> >>>>implement such a beast, but it will require some (ha!) tinkering
>>>with
>>> >>>>the FlexJS JS framework and FalconJx. That will take some time...
>>> >>>>
>>> >>>>EdB
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>> >>>><bi...@gmail.com> wrote:
>>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com>
>>> >>>>>wrote:
>>> >>>>>
>>> >>>>>> I think FalconJS was going to generate something like:
>>> >>>>>>
>>> >>>>>> if (child != undefined &&
>>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>> >>>>>>
>>> >>>>>> Not sure what it was going to do for classes, maybe chase the
>>> >>>>>>prototype
>>> >>>>>> chain?
>>> >>>>>>
>>> >>>>>> The other thing that occurred to me about $implements or
>>> >>>>>>child.is(IChrome)
>>> >>>>>> is that all objects must then have these properties or functions
>>> >>>>>>where
>>> >>>>>>the
>>> >>>>>> global function
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>
>
>
>--
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Hi,
I'm busy building support for the "is" and "as" operators into FlexJS.
Now, first I thought I'd try to compile the FlexJSTest_again example.
To my suprise, I get an error:
CSS codegen problem. Reason: 'Unable to find compilation unit for
Embed(source="Assets.swf",symbol="mx.skins.cursor.BusyCursor")'
The error seems to originate from FalconJx, it is thrown in
JSCSSCompilationSession.java... Now, my sources are fresh, I've
rebuild the SDK (super-clean main), all compiler projects (wipe main)
and the FlexUI.swc. Am I missing something (command line arg) or is
there some source not yet committed or something more obvious I'm
overlooking?
These are my arguments:
+env.PLAYERGLOBAL_HOME=/Users/erik/Documents/ApacheFlex/dependencies/PlayerGlobal/player
+playerglobal.version=11.1
-load-config="/Applications/Adobe Flash Builder
4.7/sdks/4.10.0/frameworks/flex-config.xml"
-library-path+=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/as/libs/FlexJSUI.swc
-js-output-type=FLEXJS
-closure-lib=/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library
-sdk-js-lib=/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/js/FlexJS/src
/Users/erik/Documents/ApacheFlex/git/flex-asjs/examples/FlexJSTest_again/src/FlexJSTest_again.mxml
EdB
On Thu, Oct 31, 2013 at 6:37 AM, Erik de Bruin <er...@ixsoftware.nl> wrote:
> I'll have a look at it today.
>
> EdB
>
>
>
> On Wednesday, October 30, 2013, Peter Ent wrote:
>>
>> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces so we'll
>> have to find a reasonable solution for this. We've managed to avoid the
>> situation in JavaScript but it is coming up quickly.
>>
>> --peter
>>
>> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>
>> >Some guidance can be found here [1] and here [2].
>> >
>> >EdB
>> >
>> >1:
>>
>> > >http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-interfaces-
>> >packages-and-namespaces/
>> >2:
>>
>> > >https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+language+f
>> >eatures+in+JavaScript+using+AMD+and+ES5
>> >
>> >
>> >
>> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin <er...@ixsoftware.nl>
>> > wrote:
>> >> "instanceof" doesn't check if an interface is implemented, neither in
>> >> Flex nor using Closure inheritance in JavaScript. What we need for
>> >> runtime checking of interface implementation is an global "is"
>> >> function... I think I taught FalconJx to translate "ClassA is ClassB"
>> >> as "is(ClassA, ClassB)". All we need to do now is to implement a
>> >> global "is()" function and somehow teach the compiler to keep track of
>> >> which classes implement which interfaces - all the way up the chain
>> >> and sideways (interfaces can implement interfaces).
>> >>
>> >> EdB
>> >>
>> >>
>> >>
>> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com> wrote:
>> >>> Reviving this thread...
>> >>>
>> >>> Peter says he wants to test to see if an object implements an
>> >>>interface at
>> >>> runtime. What mechanism do we want to use?
>> >>>
>> >>> I don't think we need to make instanceof work, just have some test to
>> >>>call.
>> >>>
>> >>> -Alex
>> >>>
>> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>> >>>
>> >>>>When using interfaces for type checking, there are two 'kinds': at
>> >>>>compilation and at runtime.
>> >>>>
>> >>>>The @interface and @implements annotations are for compile time
>> >>>>checking.
>> >>>>
>> >>>>For runtime checking comes in two flavours: 'instanceof' and 'is'.
>> >>>>
>> >>>>Our method of setting up inheritance (goog.inherits) maintains the
>> >>>>inheritance chain, so 'instanceof' works out of the box.
>> >>>>
>> >>>>The work starts with 'is'. We want to story the 'extends' and
>> >>>>'implements' metadata from AS in the JS classes and create a method to
>> >>>>test against that metadata set. I have a pretty good idea on how to
>> >>>>implement such a beast, but it will require some (ha!) tinkering with
>> >>>>the FlexJS JS framework and FalconJx. That will take some time...
>> >>>>
>> >>>>EdB
>> >>>>
>> >>>>
>> >>>>
>> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>> >>>><bi...@gmail.com> wrote:
>> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com>
>> >>>>>wrote:
>> >>>>>
>> >>>>>> I think FalconJS was going to generate something like:
>> >>>>>>
>> >>>>>> if (child != undefined &&
>> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
>> >>>>>>
>> >>>>>> Not sure what it was going to do for classes, maybe chase the
>> >>>>>>prototype
>> >>>>>> chain?
>> >>>>>>
>> >>>>>> The other thing that occurred to me about $implements or
>> >>>>>>child.is(IChrome)
>> >>>>>> is that all objects must then have these properties or functions
>> >>>>>>where
>> >>>>>>the
>> >>>>>> global function
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Erik de Bruin <er...@ixsoftware.nl>.
I'll have a look at it today.
EdB
On Wednesday, October 30, 2013, Peter Ent wrote:
> Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces so we'll
> have to find a reasonable solution for this. We've managed to avoid the
> situation in JavaScript but it is coming up quickly.
>
> --peter
>
> On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>
> >Some guidance can be found here [1] and here [2].
> >
> >EdB
> >
> >1:
> >
> http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-interfaces-
> >packages-and-namespaces/
> >2:
> >
> https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+language+f
> >eatures+in+JavaScript+using+AMD+and+ES5
> >
> >
> >
> >On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin <er...@ixsoftware.nl>
> wrote:
> >> "instanceof" doesn't check if an interface is implemented, neither in
> >> Flex nor using Closure inheritance in JavaScript. What we need for
> >> runtime checking of interface implementation is an global "is"
> >> function... I think I taught FalconJx to translate "ClassA is ClassB"
> >> as "is(ClassA, ClassB)". All we need to do now is to implement a
> >> global "is()" function and somehow teach the compiler to keep track of
> >> which classes implement which interfaces - all the way up the chain
> >> and sideways (interfaces can implement interfaces).
> >>
> >> EdB
> >>
> >>
> >>
> >> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com> wrote:
> >>> Reviving this thread...
> >>>
> >>> Peter says he wants to test to see if an object implements an
> >>>interface at
> >>> runtime. What mechanism do we want to use?
> >>>
> >>> I don't think we need to make instanceof work, just have some test to
> >>>call.
> >>>
> >>> -Alex
> >>>
> >>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
> >>>
> >>>>When using interfaces for type checking, there are two 'kinds': at
> >>>>compilation and at runtime.
> >>>>
> >>>>The @interface and @implements annotations are for compile time
> >>>>checking.
> >>>>
> >>>>For runtime checking comes in two flavours: 'instanceof' and 'is'.
> >>>>
> >>>>Our method of setting up inheritance (goog.inherits) maintains the
> >>>>inheritance chain, so 'instanceof' works out of the box.
> >>>>
> >>>>The work starts with 'is'. We want to story the 'extends' and
> >>>>'implements' metadata from AS in the JS classes and create a method to
> >>>>test against that metadata set. I have a pretty good idea on how to
> >>>>implement such a beast, but it will require some (ha!) tinkering with
> >>>>the FlexJS JS framework and FalconJx. That will take some time...
> >>>>
> >>>>EdB
> >>>>
> >>>>
> >>>>
> >>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
> >>>><bi...@gmail.com> wrote:
> >>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com>
> >>>>>wrote:
> >>>>>
> >>>>>> I think FalconJS was going to generate something like:
> >>>>>>
> >>>>>> if (child != undefined &&
> >>>>>> child.$implements["org.apache.flex.core.IChrome"])
> >>>>>>
> >>>>>> Not sure what it was going to do for classes, maybe chase the
> >>>>>>prototype
> >>>>>> chain?
> >>>>>>
> >>>>>> The other thing that occurred to me about $implements or
> >>>>>>child.is(IChrome)
> >>>>>> is that all objects must then have these properties or functions
> >>>>>>where
> >>>>>>the
> >>>>>> global function
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Peter Ent <pe...@adobe.com>.
Thanks, Erik. Interesting read. FlexJS uses a lot of interfaces so we'll
have to find a reasonable solution for this. We've managed to avoid the
situation in JavaScript but it is coming up quickly.
--peter
On 10/30/13 3:10 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>Some guidance can be found here [1] and here [2].
>
>EdB
>
>1:
>http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-interfaces-
>packages-and-namespaces/
>2:
>https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+language+f
>eatures+in+JavaScript+using+AMD+and+ES5
>
>
>
>On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
>> "instanceof" doesn't check if an interface is implemented, neither in
>> Flex nor using Closure inheritance in JavaScript. What we need for
>> runtime checking of interface implementation is an global "is"
>> function... I think I taught FalconJx to translate "ClassA is ClassB"
>> as "is(ClassA, ClassB)". All we need to do now is to implement a
>> global "is()" function and somehow teach the compiler to keep track of
>> which classes implement which interfaces - all the way up the chain
>> and sideways (interfaces can implement interfaces).
>>
>> EdB
>>
>>
>>
>> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com> wrote:
>>> Reviving this thread...
>>>
>>> Peter says he wants to test to see if an object implements an
>>>interface at
>>> runtime. What mechanism do we want to use?
>>>
>>> I don't think we need to make instanceof work, just have some test to
>>>call.
>>>
>>> -Alex
>>>
>>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>
>>>>When using interfaces for type checking, there are two 'kinds': at
>>>>compilation and at runtime.
>>>>
>>>>The @interface and @implements annotations are for compile time
>>>>checking.
>>>>
>>>>For runtime checking comes in two flavours: 'instanceof' and 'is'.
>>>>
>>>>Our method of setting up inheritance (goog.inherits) maintains the
>>>>inheritance chain, so 'instanceof' works out of the box.
>>>>
>>>>The work starts with 'is'. We want to story the 'extends' and
>>>>'implements' metadata from AS in the JS classes and create a method to
>>>>test against that metadata set. I have a pretty good idea on how to
>>>>implement such a beast, but it will require some (ha!) tinkering with
>>>>the FlexJS JS framework and FalconJx. That will take some time...
>>>>
>>>>EdB
>>>>
>>>>
>>>>
>>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>>><bi...@gmail.com> wrote:
>>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com>
>>>>>wrote:
>>>>>
>>>>>> I think FalconJS was going to generate something like:
>>>>>>
>>>>>> if (child != undefined &&
>>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>>>
>>>>>> Not sure what it was going to do for classes, maybe chase the
>>>>>>prototype
>>>>>> chain?
>>>>>>
>>>>>> The other thing that occurred to me about $implements or
>>>>>>child.is(IChrome)
>>>>>> is that all objects must then have these properties or functions
>>>>>>where
>>>>>>the
>>>>>> global function could work out of a central database that doesn't
>>>>>>decorate
>>>>>> the classes.
>>>>>>
>>>>>> I don't have a strong opinion either way right now.
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>
>>>>> From all my research on Closure's @implements handling, it seems like
>>>>>there
>>>>> should be at least one method/member in the @interface. So how will
>>>>>it
>>>>> handle 'Marker Interfaces', i.e. interfaces which have no methods.
>>>>>
>>>>> IChrome - which we have been discussing in the other thread is this
>>>>>kind of
>>>>> an interface. It is used to just mark an object so it can be used
>>>>>for
>>>>>type
>>>>> checking.
>>>>>
>>>>> Is this possible with Closure? Sorry, I have not set up to Closure
>>>>> properly on my machine. Can one of you try this out to see if it is
>>>>> possible?
>>>>>
>>>>> Thanks,
>>>>> Om
>>>>>
>>>>>
>>>>>>
>>>>>> On 7/29/13 10:49 AM, "Kessler CTR Mark J"
>>>>>><ma...@usmc.mil>
>>>>>> wrote:
>>>>>>
>>>>>> >Looking on it a second time, I guess you have to test it exists in
>>>>>>there
>>>>>> >for both, so maybe it's a moot issue.
>>>>>> >
>>>>>> >-Mark
>>>>>> >
>>>>>> >-----Original Message-----
>>>>>> >From: Kessler CTR Mark J [mailto:mark.kessler.ctr@usmc.mil]
>>>>>> >Sent: Monday, July 29, 2013 1:43 PM
>>>>>> >To: dev@flex.apache.org
>>>>>> >Subject: RE: [FlexJS] Handling chrome elements
>>>>>> >
>>>>>> > I've gotten used to being able to do Type checks with "is". It
>>>>>>also
>>>>>> >stands out as a different format visually. I think the only
>>>>>>problem
>>>>>> >with that change is, the child couldn't be null/undefined. It
>>>>>>would
>>>>>>have
>>>>>> >to be able to run that method. Whereas the current "is" can
>>>>>>compare
>>>>>>the
>>>>>> >datatype with it being null/undefined.
>>>>>> >
>>>>>> >
>>>>>> >-Mark
>>>>>> >
>>>>>> >-----Original Message-----
>>>>>> >From: Erik de Bruin [mailto:erik@ixsoftware.nl]
>>>>>> >Sent: Monday, July 29, 2013 12:59 PM
>>>>>> >To: dev@flex.apache.org
>>>>>> >Subject: Re: [FlexJS] Handling chrome elements
>>>>>> >
>>>>>> >Ah, the "is" issue.
>>>>>> >
>>>>>> >We don't seem to be able to get out from under a 'helper' method
>>>>>>(or
>>>>>> >whatever the term-du-jour is for that thing) and a 'storage'
>>>>>>property.
>>>>>> >
>>>>>> >Personally I like to go from this AS:
>>>>>> >
>>>>>> >if (child is IChrome)
>>>>>> >
>>>>>> >to this JS:
>>>>>> >
>>>>>> >if (child.is(IChrome))
>>>>>> >
>>>>>> >That would make it relatively easy to work with it in the cross
>>>>>> >compiler. Another possibility is to have a global function, but I
>>>>>> >don't like that very much.
>>>>>> >
>>>>>> >Thoughts?
>>>>>> >
>>>>>> >EdB
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >On Mon, Jul 29, 2013 at 4:23 PM, Alex Harui <ah...@adobe.com>
>>>>>>wrote:
>>>>>> >> Thanks for that. I'm more interested in the runtime use of
>>>>>>interfaces.
>>>>>> >> What is the JS output for this AS?
>>>>>> >>
>>>>>> >> if (child is IChrome)
>>>>>> >>
>>>>>> >> It looked like FalconJS was going to create a $implements object
>>>>>>on
>>>>>>each
>>>>>> >> class and "is" code would test against that. What should we do
>>>>>>for
>>>>>> >> FalconJX?
>>>>>> >>
>>>>>> >> Thanks,
>>>>>> >> -Alex
>>>>>> >>
>>>>>> >>
>>>>>> >> On 7/28/13 11:50 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>>> >>
>>>>>> >>>More on how to write the JS side:
>>>>>> >>>
>>>>>> >>>
>>>>>>
>>>>>>https://developers.google.com/closure/compiler/docs/js-for-compiler#t
>>>>>>ags
>>>>>> >>>
>>>>>> >>>Search for '@implements'. It has a short but sweet example.
>>>>>> >>>
>>>>>> >>>EdB
>>>>>> >>>
>>>>>> >>>
>>>>>> >>>
>>>>>> >>>On Mon, Jul 29, 2013 at 8:43 AM, Erik de Bruin
>>>>>><er...@ixsoftware.nl>
>>>>>> >>>wrote:
>>>>>> >>>>>> >Also IChrome (looks like a Marker Interface) could lead to a
>>>>>>subtle
>>>>>> >>>>>> >problem
>>>>>> >>>>>> >on the JS side. I have not been following the conversation
>>>>>>on
>>>>>>how
>>>>>> >>>>>>to deal
>>>>>> >>>>>> >with Interfaces on the JS side. If we are planning on using
>>>>>>'duck
>>>>>> >>>>>> >typing',
>>>>>> >>>>>> >then we could run into issues with empty interfaces. Or am
>>>>>>I
>>>>>> >>>>>>missing
>>>>>> >>>>>> >something here?
>>>>>> >>>>>> I'm not sure what we'll end up doing for interfaces on JS.
>>>>>>It
>>>>>>looks
>>>>>> >>>>>>like
>>>>>> >>>>>> some compiler code expects to list interfaces in an
>>>>>>$implements
>>>>>> >>>>>>property
>>>>>> >>>>>> object.
>>>>>> >>>>>>
>>>>>> >>>>>
>>>>>> >>>>> Can someone shine some light on this? Erik, Michael?
>>>>>> >>>>
>>>>>> >>>> Interfaces on the JS side are implemented for the Closure
>>>>>>Compiler
>>>>>> >>>> using the @interface for declaration and the @implements JSDoc
>>>>>> >>>> annotation. FalconJx knows about this, so - with caution and
>>>>>>testing -
>>>>>> >>>> you should be able to approach interfaces the same in JS as in
>>>>>>AS.
>>>>>> >>>>
>>>>>> >>>> Let me know if I can help out with some example code or
>>>>>>something.
>>>>>> >>>> Also, if you run into problems, I can alway crack open FalconJx
>>>>>>and
>>>>>> >>>> create the solution you would like to see.
>>>>>> >>>>
>>>>>> >>>> EdB
>>>>>> >>>>
>>>>>> >>>>
>>>>>> >>>>
>>>>>> >>>> --
>>>>>> >>>> Ix Multimedia Software
>>>>>> >>>>
>>>>>> >>>> Jan Luykenstraat 27
>>>>>> >>>> 3521 VB Utrecht
>>>>>> >>>>
>>>>>> >>>> T. 06-51952295
>>>>>> >>>> I. www.ixsoftware.nl
>>>>>> >>>
>>>>>> >>>
>>>>>> >>>
>>>>>> >>>--
>>>>>> >>>Ix Multimedia Software
>>>>>> >>>
>>>>>> >>>Jan Luykenstraat 27
>>>>>> >>>3521 VB Utrecht
>>>>>> >>>
>>>>>> >>>T. 06-51952295
>>>>>> >>>I. www.ixsoftware.nl
>>>>>> >>
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >--
>>>>>> >Ix Multimedia Software
>>>>>> >
>>>>>> >Jan Luykenstraat 27
>>>>>> >3521 VB Utrecht
>>>>>> >
>>>>>> >T. 06-51952295
>>>>>> >I. www.ixsoftware.nl
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>>>--
>>>>Ix Multimedia Software
>>>>
>>>>Jan Luykenstraat 27
>>>>3521 VB Utrecht
>>>>
>>>>T. 06-51952295
>>>>I. www.ixsoftware.nl
>>>
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>
>
>
>--
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Some guidance can be found here [1] and here [2].
EdB
1: http://blogs.adobe.com/bparadie/2011/11/26/classes-inheritance-interfaces-packages-and-namespaces/
2: https://cwiki.apache.org/confluence/display/FLEX/Simulating+AS3+language+features+in+JavaScript+using+AMD+and+ES5
On Wed, Oct 30, 2013 at 8:07 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
> "instanceof" doesn't check if an interface is implemented, neither in
> Flex nor using Closure inheritance in JavaScript. What we need for
> runtime checking of interface implementation is an global "is"
> function... I think I taught FalconJx to translate "ClassA is ClassB"
> as "is(ClassA, ClassB)". All we need to do now is to implement a
> global "is()" function and somehow teach the compiler to keep track of
> which classes implement which interfaces - all the way up the chain
> and sideways (interfaces can implement interfaces).
>
> EdB
>
>
>
> On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com> wrote:
>> Reviving this thread...
>>
>> Peter says he wants to test to see if an object implements an interface at
>> runtime. What mechanism do we want to use?
>>
>> I don't think we need to make instanceof work, just have some test to call.
>>
>> -Alex
>>
>> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>
>>>When using interfaces for type checking, there are two 'kinds': at
>>>compilation and at runtime.
>>>
>>>The @interface and @implements annotations are for compile time checking.
>>>
>>>For runtime checking comes in two flavours: 'instanceof' and 'is'.
>>>
>>>Our method of setting up inheritance (goog.inherits) maintains the
>>>inheritance chain, so 'instanceof' works out of the box.
>>>
>>>The work starts with 'is'. We want to story the 'extends' and
>>>'implements' metadata from AS in the JS classes and create a method to
>>>test against that metadata set. I have a pretty good idea on how to
>>>implement such a beast, but it will require some (ha!) tinkering with
>>>the FlexJS JS framework and FalconJx. That will take some time...
>>>
>>>EdB
>>>
>>>
>>>
>>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>>><bi...@gmail.com> wrote:
>>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com> wrote:
>>>>
>>>>> I think FalconJS was going to generate something like:
>>>>>
>>>>> if (child != undefined &&
>>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>>
>>>>> Not sure what it was going to do for classes, maybe chase the prototype
>>>>> chain?
>>>>>
>>>>> The other thing that occurred to me about $implements or
>>>>>child.is(IChrome)
>>>>> is that all objects must then have these properties or functions where
>>>>>the
>>>>> global function could work out of a central database that doesn't
>>>>>decorate
>>>>> the classes.
>>>>>
>>>>> I don't have a strong opinion either way right now.
>>>>>
>>>>> -Alex
>>>>>
>>>>
>>>> From all my research on Closure's @implements handling, it seems like
>>>>there
>>>> should be at least one method/member in the @interface. So how will it
>>>> handle 'Marker Interfaces', i.e. interfaces which have no methods.
>>>>
>>>> IChrome - which we have been discussing in the other thread is this
>>>>kind of
>>>> an interface. It is used to just mark an object so it can be used for
>>>>type
>>>> checking.
>>>>
>>>> Is this possible with Closure? Sorry, I have not set up to Closure
>>>> properly on my machine. Can one of you try this out to see if it is
>>>> possible?
>>>>
>>>> Thanks,
>>>> Om
>>>>
>>>>
>>>>>
>>>>> On 7/29/13 10:49 AM, "Kessler CTR Mark J" <ma...@usmc.mil>
>>>>> wrote:
>>>>>
>>>>> >Looking on it a second time, I guess you have to test it exists in
>>>>>there
>>>>> >for both, so maybe it's a moot issue.
>>>>> >
>>>>> >-Mark
>>>>> >
>>>>> >-----Original Message-----
>>>>> >From: Kessler CTR Mark J [mailto:mark.kessler.ctr@usmc.mil]
>>>>> >Sent: Monday, July 29, 2013 1:43 PM
>>>>> >To: dev@flex.apache.org
>>>>> >Subject: RE: [FlexJS] Handling chrome elements
>>>>> >
>>>>> > I've gotten used to being able to do Type checks with "is". It
>>>>>also
>>>>> >stands out as a different format visually. I think the only problem
>>>>> >with that change is, the child couldn't be null/undefined. It would
>>>>>have
>>>>> >to be able to run that method. Whereas the current "is" can compare
>>>>>the
>>>>> >datatype with it being null/undefined.
>>>>> >
>>>>> >
>>>>> >-Mark
>>>>> >
>>>>> >-----Original Message-----
>>>>> >From: Erik de Bruin [mailto:erik@ixsoftware.nl]
>>>>> >Sent: Monday, July 29, 2013 12:59 PM
>>>>> >To: dev@flex.apache.org
>>>>> >Subject: Re: [FlexJS] Handling chrome elements
>>>>> >
>>>>> >Ah, the "is" issue.
>>>>> >
>>>>> >We don't seem to be able to get out from under a 'helper' method (or
>>>>> >whatever the term-du-jour is for that thing) and a 'storage' property.
>>>>> >
>>>>> >Personally I like to go from this AS:
>>>>> >
>>>>> >if (child is IChrome)
>>>>> >
>>>>> >to this JS:
>>>>> >
>>>>> >if (child.is(IChrome))
>>>>> >
>>>>> >That would make it relatively easy to work with it in the cross
>>>>> >compiler. Another possibility is to have a global function, but I
>>>>> >don't like that very much.
>>>>> >
>>>>> >Thoughts?
>>>>> >
>>>>> >EdB
>>>>> >
>>>>> >
>>>>> >
>>>>> >On Mon, Jul 29, 2013 at 4:23 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>> >> Thanks for that. I'm more interested in the runtime use of
>>>>>interfaces.
>>>>> >> What is the JS output for this AS?
>>>>> >>
>>>>> >> if (child is IChrome)
>>>>> >>
>>>>> >> It looked like FalconJS was going to create a $implements object on
>>>>>each
>>>>> >> class and "is" code would test against that. What should we do for
>>>>> >> FalconJX?
>>>>> >>
>>>>> >> Thanks,
>>>>> >> -Alex
>>>>> >>
>>>>> >>
>>>>> >> On 7/28/13 11:50 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>>> >>
>>>>> >>>More on how to write the JS side:
>>>>> >>>
>>>>> >>>
>>>>>
>>>>>https://developers.google.com/closure/compiler/docs/js-for-compiler#tags
>>>>> >>>
>>>>> >>>Search for '@implements'. It has a short but sweet example.
>>>>> >>>
>>>>> >>>EdB
>>>>> >>>
>>>>> >>>
>>>>> >>>
>>>>> >>>On Mon, Jul 29, 2013 at 8:43 AM, Erik de Bruin <er...@ixsoftware.nl>
>>>>> >>>wrote:
>>>>> >>>>>> >Also IChrome (looks like a Marker Interface) could lead to a
>>>>>subtle
>>>>> >>>>>> >problem
>>>>> >>>>>> >on the JS side. I have not been following the conversation on
>>>>>how
>>>>> >>>>>>to deal
>>>>> >>>>>> >with Interfaces on the JS side. If we are planning on using
>>>>>'duck
>>>>> >>>>>> >typing',
>>>>> >>>>>> >then we could run into issues with empty interfaces. Or am I
>>>>> >>>>>>missing
>>>>> >>>>>> >something here?
>>>>> >>>>>> I'm not sure what we'll end up doing for interfaces on JS. It
>>>>>looks
>>>>> >>>>>>like
>>>>> >>>>>> some compiler code expects to list interfaces in an $implements
>>>>> >>>>>>property
>>>>> >>>>>> object.
>>>>> >>>>>>
>>>>> >>>>>
>>>>> >>>>> Can someone shine some light on this? Erik, Michael?
>>>>> >>>>
>>>>> >>>> Interfaces on the JS side are implemented for the Closure Compiler
>>>>> >>>> using the @interface for declaration and the @implements JSDoc
>>>>> >>>> annotation. FalconJx knows about this, so - with caution and
>>>>>testing -
>>>>> >>>> you should be able to approach interfaces the same in JS as in AS.
>>>>> >>>>
>>>>> >>>> Let me know if I can help out with some example code or something.
>>>>> >>>> Also, if you run into problems, I can alway crack open FalconJx
>>>>>and
>>>>> >>>> create the solution you would like to see.
>>>>> >>>>
>>>>> >>>> EdB
>>>>> >>>>
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> --
>>>>> >>>> Ix Multimedia Software
>>>>> >>>>
>>>>> >>>> Jan Luykenstraat 27
>>>>> >>>> 3521 VB Utrecht
>>>>> >>>>
>>>>> >>>> T. 06-51952295
>>>>> >>>> I. www.ixsoftware.nl
>>>>> >>>
>>>>> >>>
>>>>> >>>
>>>>> >>>--
>>>>> >>>Ix Multimedia Software
>>>>> >>>
>>>>> >>>Jan Luykenstraat 27
>>>>> >>>3521 VB Utrecht
>>>>> >>>
>>>>> >>>T. 06-51952295
>>>>> >>>I. www.ixsoftware.nl
>>>>> >>
>>>>> >
>>>>> >
>>>>> >
>>>>> >--
>>>>> >Ix Multimedia Software
>>>>> >
>>>>> >Jan Luykenstraat 27
>>>>> >3521 VB Utrecht
>>>>> >
>>>>> >T. 06-51952295
>>>>> >I. www.ixsoftware.nl
>>>>>
>>>>>
>>>
>>>
>>>
>>>--
>>>Ix Multimedia Software
>>>
>>>Jan Luykenstraat 27
>>>3521 VB Utrecht
>>>
>>>T. 06-51952295
>>>I. www.ixsoftware.nl
>>
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Erik de Bruin <er...@ixsoftware.nl>.
"instanceof" doesn't check if an interface is implemented, neither in
Flex nor using Closure inheritance in JavaScript. What we need for
runtime checking of interface implementation is an global "is"
function... I think I taught FalconJx to translate "ClassA is ClassB"
as "is(ClassA, ClassB)". All we need to do now is to implement a
global "is()" function and somehow teach the compiler to keep track of
which classes implement which interfaces - all the way up the chain
and sideways (interfaces can implement interfaces).
EdB
On Wed, Oct 30, 2013 at 6:34 PM, Alex Harui <ah...@adobe.com> wrote:
> Reviving this thread...
>
> Peter says he wants to test to see if an object implements an interface at
> runtime. What mechanism do we want to use?
>
> I don't think we need to make instanceof work, just have some test to call.
>
> -Alex
>
> On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>
>>When using interfaces for type checking, there are two 'kinds': at
>>compilation and at runtime.
>>
>>The @interface and @implements annotations are for compile time checking.
>>
>>For runtime checking comes in two flavours: 'instanceof' and 'is'.
>>
>>Our method of setting up inheritance (goog.inherits) maintains the
>>inheritance chain, so 'instanceof' works out of the box.
>>
>>The work starts with 'is'. We want to story the 'extends' and
>>'implements' metadata from AS in the JS classes and create a method to
>>test against that metadata set. I have a pretty good idea on how to
>>implement such a beast, but it will require some (ha!) tinkering with
>>the FlexJS JS framework and FalconJx. That will take some time...
>>
>>EdB
>>
>>
>>
>>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
>><bi...@gmail.com> wrote:
>>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com> wrote:
>>>
>>>> I think FalconJS was going to generate something like:
>>>>
>>>> if (child != undefined &&
>>>> child.$implements["org.apache.flex.core.IChrome"])
>>>>
>>>> Not sure what it was going to do for classes, maybe chase the prototype
>>>> chain?
>>>>
>>>> The other thing that occurred to me about $implements or
>>>>child.is(IChrome)
>>>> is that all objects must then have these properties or functions where
>>>>the
>>>> global function could work out of a central database that doesn't
>>>>decorate
>>>> the classes.
>>>>
>>>> I don't have a strong opinion either way right now.
>>>>
>>>> -Alex
>>>>
>>>
>>> From all my research on Closure's @implements handling, it seems like
>>>there
>>> should be at least one method/member in the @interface. So how will it
>>> handle 'Marker Interfaces', i.e. interfaces which have no methods.
>>>
>>> IChrome - which we have been discussing in the other thread is this
>>>kind of
>>> an interface. It is used to just mark an object so it can be used for
>>>type
>>> checking.
>>>
>>> Is this possible with Closure? Sorry, I have not set up to Closure
>>> properly on my machine. Can one of you try this out to see if it is
>>> possible?
>>>
>>> Thanks,
>>> Om
>>>
>>>
>>>>
>>>> On 7/29/13 10:49 AM, "Kessler CTR Mark J" <ma...@usmc.mil>
>>>> wrote:
>>>>
>>>> >Looking on it a second time, I guess you have to test it exists in
>>>>there
>>>> >for both, so maybe it's a moot issue.
>>>> >
>>>> >-Mark
>>>> >
>>>> >-----Original Message-----
>>>> >From: Kessler CTR Mark J [mailto:mark.kessler.ctr@usmc.mil]
>>>> >Sent: Monday, July 29, 2013 1:43 PM
>>>> >To: dev@flex.apache.org
>>>> >Subject: RE: [FlexJS] Handling chrome elements
>>>> >
>>>> > I've gotten used to being able to do Type checks with "is". It
>>>>also
>>>> >stands out as a different format visually. I think the only problem
>>>> >with that change is, the child couldn't be null/undefined. It would
>>>>have
>>>> >to be able to run that method. Whereas the current "is" can compare
>>>>the
>>>> >datatype with it being null/undefined.
>>>> >
>>>> >
>>>> >-Mark
>>>> >
>>>> >-----Original Message-----
>>>> >From: Erik de Bruin [mailto:erik@ixsoftware.nl]
>>>> >Sent: Monday, July 29, 2013 12:59 PM
>>>> >To: dev@flex.apache.org
>>>> >Subject: Re: [FlexJS] Handling chrome elements
>>>> >
>>>> >Ah, the "is" issue.
>>>> >
>>>> >We don't seem to be able to get out from under a 'helper' method (or
>>>> >whatever the term-du-jour is for that thing) and a 'storage' property.
>>>> >
>>>> >Personally I like to go from this AS:
>>>> >
>>>> >if (child is IChrome)
>>>> >
>>>> >to this JS:
>>>> >
>>>> >if (child.is(IChrome))
>>>> >
>>>> >That would make it relatively easy to work with it in the cross
>>>> >compiler. Another possibility is to have a global function, but I
>>>> >don't like that very much.
>>>> >
>>>> >Thoughts?
>>>> >
>>>> >EdB
>>>> >
>>>> >
>>>> >
>>>> >On Mon, Jul 29, 2013 at 4:23 PM, Alex Harui <ah...@adobe.com> wrote:
>>>> >> Thanks for that. I'm more interested in the runtime use of
>>>>interfaces.
>>>> >> What is the JS output for this AS?
>>>> >>
>>>> >> if (child is IChrome)
>>>> >>
>>>> >> It looked like FalconJS was going to create a $implements object on
>>>>each
>>>> >> class and "is" code would test against that. What should we do for
>>>> >> FalconJX?
>>>> >>
>>>> >> Thanks,
>>>> >> -Alex
>>>> >>
>>>> >>
>>>> >> On 7/28/13 11:50 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>>> >>
>>>> >>>More on how to write the JS side:
>>>> >>>
>>>> >>>
>>>>
>>>>https://developers.google.com/closure/compiler/docs/js-for-compiler#tags
>>>> >>>
>>>> >>>Search for '@implements'. It has a short but sweet example.
>>>> >>>
>>>> >>>EdB
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>>On Mon, Jul 29, 2013 at 8:43 AM, Erik de Bruin <er...@ixsoftware.nl>
>>>> >>>wrote:
>>>> >>>>>> >Also IChrome (looks like a Marker Interface) could lead to a
>>>>subtle
>>>> >>>>>> >problem
>>>> >>>>>> >on the JS side. I have not been following the conversation on
>>>>how
>>>> >>>>>>to deal
>>>> >>>>>> >with Interfaces on the JS side. If we are planning on using
>>>>'duck
>>>> >>>>>> >typing',
>>>> >>>>>> >then we could run into issues with empty interfaces. Or am I
>>>> >>>>>>missing
>>>> >>>>>> >something here?
>>>> >>>>>> I'm not sure what we'll end up doing for interfaces on JS. It
>>>>looks
>>>> >>>>>>like
>>>> >>>>>> some compiler code expects to list interfaces in an $implements
>>>> >>>>>>property
>>>> >>>>>> object.
>>>> >>>>>>
>>>> >>>>>
>>>> >>>>> Can someone shine some light on this? Erik, Michael?
>>>> >>>>
>>>> >>>> Interfaces on the JS side are implemented for the Closure Compiler
>>>> >>>> using the @interface for declaration and the @implements JSDoc
>>>> >>>> annotation. FalconJx knows about this, so - with caution and
>>>>testing -
>>>> >>>> you should be able to approach interfaces the same in JS as in AS.
>>>> >>>>
>>>> >>>> Let me know if I can help out with some example code or something.
>>>> >>>> Also, if you run into problems, I can alway crack open FalconJx
>>>>and
>>>> >>>> create the solution you would like to see.
>>>> >>>>
>>>> >>>> EdB
>>>> >>>>
>>>> >>>>
>>>> >>>>
>>>> >>>> --
>>>> >>>> Ix Multimedia Software
>>>> >>>>
>>>> >>>> Jan Luykenstraat 27
>>>> >>>> 3521 VB Utrecht
>>>> >>>>
>>>> >>>> T. 06-51952295
>>>> >>>> I. www.ixsoftware.nl
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>>--
>>>> >>>Ix Multimedia Software
>>>> >>>
>>>> >>>Jan Luykenstraat 27
>>>> >>>3521 VB Utrecht
>>>> >>>
>>>> >>>T. 06-51952295
>>>> >>>I. www.ixsoftware.nl
>>>> >>
>>>> >
>>>> >
>>>> >
>>>> >--
>>>> >Ix Multimedia Software
>>>> >
>>>> >Jan Luykenstraat 27
>>>> >3521 VB Utrecht
>>>> >
>>>> >T. 06-51952295
>>>> >I. www.ixsoftware.nl
>>>>
>>>>
>>
>>
>>
>>--
>>Ix Multimedia Software
>>
>>Jan Luykenstraat 27
>>3521 VB Utrecht
>>
>>T. 06-51952295
>>I. www.ixsoftware.nl
>
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Alex Harui <ah...@adobe.com>.
Reviving this thread...
Peter says he wants to test to see if an object implements an interface at
runtime. What mechanism do we want to use?
I don't think we need to make instanceof work, just have some test to call.
-Alex
On 7/30/13 12:46 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>When using interfaces for type checking, there are two 'kinds': at
>compilation and at runtime.
>
>The @interface and @implements annotations are for compile time checking.
>
>For runtime checking comes in two flavours: 'instanceof' and 'is'.
>
>Our method of setting up inheritance (goog.inherits) maintains the
>inheritance chain, so 'instanceof' works out of the box.
>
>The work starts with 'is'. We want to story the 'extends' and
>'implements' metadata from AS in the JS classes and create a method to
>test against that metadata set. I have a pretty good idea on how to
>implement such a beast, but it will require some (ha!) tinkering with
>the FlexJS JS framework and FalconJx. That will take some time...
>
>EdB
>
>
>
>On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
><bi...@gmail.com> wrote:
>> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com> wrote:
>>
>>> I think FalconJS was going to generate something like:
>>>
>>> if (child != undefined &&
>>> child.$implements["org.apache.flex.core.IChrome"])
>>>
>>> Not sure what it was going to do for classes, maybe chase the prototype
>>> chain?
>>>
>>> The other thing that occurred to me about $implements or
>>>child.is(IChrome)
>>> is that all objects must then have these properties or functions where
>>>the
>>> global function could work out of a central database that doesn't
>>>decorate
>>> the classes.
>>>
>>> I don't have a strong opinion either way right now.
>>>
>>> -Alex
>>>
>>
>> From all my research on Closure's @implements handling, it seems like
>>there
>> should be at least one method/member in the @interface. So how will it
>> handle 'Marker Interfaces', i.e. interfaces which have no methods.
>>
>> IChrome - which we have been discussing in the other thread is this
>>kind of
>> an interface. It is used to just mark an object so it can be used for
>>type
>> checking.
>>
>> Is this possible with Closure? Sorry, I have not set up to Closure
>> properly on my machine. Can one of you try this out to see if it is
>> possible?
>>
>> Thanks,
>> Om
>>
>>
>>>
>>> On 7/29/13 10:49 AM, "Kessler CTR Mark J" <ma...@usmc.mil>
>>> wrote:
>>>
>>> >Looking on it a second time, I guess you have to test it exists in
>>>there
>>> >for both, so maybe it's a moot issue.
>>> >
>>> >-Mark
>>> >
>>> >-----Original Message-----
>>> >From: Kessler CTR Mark J [mailto:mark.kessler.ctr@usmc.mil]
>>> >Sent: Monday, July 29, 2013 1:43 PM
>>> >To: dev@flex.apache.org
>>> >Subject: RE: [FlexJS] Handling chrome elements
>>> >
>>> > I've gotten used to being able to do Type checks with "is". It
>>>also
>>> >stands out as a different format visually. I think the only problem
>>> >with that change is, the child couldn't be null/undefined. It would
>>>have
>>> >to be able to run that method. Whereas the current "is" can compare
>>>the
>>> >datatype with it being null/undefined.
>>> >
>>> >
>>> >-Mark
>>> >
>>> >-----Original Message-----
>>> >From: Erik de Bruin [mailto:erik@ixsoftware.nl]
>>> >Sent: Monday, July 29, 2013 12:59 PM
>>> >To: dev@flex.apache.org
>>> >Subject: Re: [FlexJS] Handling chrome elements
>>> >
>>> >Ah, the "is" issue.
>>> >
>>> >We don't seem to be able to get out from under a 'helper' method (or
>>> >whatever the term-du-jour is for that thing) and a 'storage' property.
>>> >
>>> >Personally I like to go from this AS:
>>> >
>>> >if (child is IChrome)
>>> >
>>> >to this JS:
>>> >
>>> >if (child.is(IChrome))
>>> >
>>> >That would make it relatively easy to work with it in the cross
>>> >compiler. Another possibility is to have a global function, but I
>>> >don't like that very much.
>>> >
>>> >Thoughts?
>>> >
>>> >EdB
>>> >
>>> >
>>> >
>>> >On Mon, Jul 29, 2013 at 4:23 PM, Alex Harui <ah...@adobe.com> wrote:
>>> >> Thanks for that. I'm more interested in the runtime use of
>>>interfaces.
>>> >> What is the JS output for this AS?
>>> >>
>>> >> if (child is IChrome)
>>> >>
>>> >> It looked like FalconJS was going to create a $implements object on
>>>each
>>> >> class and "is" code would test against that. What should we do for
>>> >> FalconJX?
>>> >>
>>> >> Thanks,
>>> >> -Alex
>>> >>
>>> >>
>>> >> On 7/28/13 11:50 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>> >>
>>> >>>More on how to write the JS side:
>>> >>>
>>> >>>
>>>
>>>https://developers.google.com/closure/compiler/docs/js-for-compiler#tags
>>> >>>
>>> >>>Search for '@implements'. It has a short but sweet example.
>>> >>>
>>> >>>EdB
>>> >>>
>>> >>>
>>> >>>
>>> >>>On Mon, Jul 29, 2013 at 8:43 AM, Erik de Bruin <er...@ixsoftware.nl>
>>> >>>wrote:
>>> >>>>>> >Also IChrome (looks like a Marker Interface) could lead to a
>>>subtle
>>> >>>>>> >problem
>>> >>>>>> >on the JS side. I have not been following the conversation on
>>>how
>>> >>>>>>to deal
>>> >>>>>> >with Interfaces on the JS side. If we are planning on using
>>>'duck
>>> >>>>>> >typing',
>>> >>>>>> >then we could run into issues with empty interfaces. Or am I
>>> >>>>>>missing
>>> >>>>>> >something here?
>>> >>>>>> I'm not sure what we'll end up doing for interfaces on JS. It
>>>looks
>>> >>>>>>like
>>> >>>>>> some compiler code expects to list interfaces in an $implements
>>> >>>>>>property
>>> >>>>>> object.
>>> >>>>>>
>>> >>>>>
>>> >>>>> Can someone shine some light on this? Erik, Michael?
>>> >>>>
>>> >>>> Interfaces on the JS side are implemented for the Closure Compiler
>>> >>>> using the @interface for declaration and the @implements JSDoc
>>> >>>> annotation. FalconJx knows about this, so - with caution and
>>>testing -
>>> >>>> you should be able to approach interfaces the same in JS as in AS.
>>> >>>>
>>> >>>> Let me know if I can help out with some example code or something.
>>> >>>> Also, if you run into problems, I can alway crack open FalconJx
>>>and
>>> >>>> create the solution you would like to see.
>>> >>>>
>>> >>>> EdB
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>> --
>>> >>>> Ix Multimedia Software
>>> >>>>
>>> >>>> Jan Luykenstraat 27
>>> >>>> 3521 VB Utrecht
>>> >>>>
>>> >>>> T. 06-51952295
>>> >>>> I. www.ixsoftware.nl
>>> >>>
>>> >>>
>>> >>>
>>> >>>--
>>> >>>Ix Multimedia Software
>>> >>>
>>> >>>Jan Luykenstraat 27
>>> >>>3521 VB Utrecht
>>> >>>
>>> >>>T. 06-51952295
>>> >>>I. www.ixsoftware.nl
>>> >>
>>> >
>>> >
>>> >
>>> >--
>>> >Ix Multimedia Software
>>> >
>>> >Jan Luykenstraat 27
>>> >3521 VB Utrecht
>>> >
>>> >T. 06-51952295
>>> >I. www.ixsoftware.nl
>>>
>>>
>
>
>
>--
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl
Re: [FlexJS] Handling interfaces
Posted by Erik de Bruin <er...@ixsoftware.nl>.
When using interfaces for type checking, there are two 'kinds': at
compilation and at runtime.
The @interface and @implements annotations are for compile time checking.
For runtime checking comes in two flavours: 'instanceof' and 'is'.
Our method of setting up inheritance (goog.inherits) maintains the
inheritance chain, so 'instanceof' works out of the box.
The work starts with 'is'. We want to story the 'extends' and
'implements' metadata from AS in the JS classes and create a method to
test against that metadata set. I have a pretty good idea on how to
implement such a beast, but it will require some (ha!) tinkering with
the FlexJS JS framework and FalconJx. That will take some time...
EdB
On Mon, Jul 29, 2013 at 9:17 PM, OmPrakash Muppirala
<bi...@gmail.com> wrote:
> On Mon, Jul 29, 2013 at 11:20 AM, Alex Harui <ah...@adobe.com> wrote:
>
>> I think FalconJS was going to generate something like:
>>
>> if (child != undefined &&
>> child.$implements["org.apache.flex.core.IChrome"])
>>
>> Not sure what it was going to do for classes, maybe chase the prototype
>> chain?
>>
>> The other thing that occurred to me about $implements or child.is(IChrome)
>> is that all objects must then have these properties or functions where the
>> global function could work out of a central database that doesn't decorate
>> the classes.
>>
>> I don't have a strong opinion either way right now.
>>
>> -Alex
>>
>
> From all my research on Closure's @implements handling, it seems like there
> should be at least one method/member in the @interface. So how will it
> handle 'Marker Interfaces', i.e. interfaces which have no methods.
>
> IChrome - which we have been discussing in the other thread is this kind of
> an interface. It is used to just mark an object so it can be used for type
> checking.
>
> Is this possible with Closure? Sorry, I have not set up to Closure
> properly on my machine. Can one of you try this out to see if it is
> possible?
>
> Thanks,
> Om
>
>
>>
>> On 7/29/13 10:49 AM, "Kessler CTR Mark J" <ma...@usmc.mil>
>> wrote:
>>
>> >Looking on it a second time, I guess you have to test it exists in there
>> >for both, so maybe it's a moot issue.
>> >
>> >-Mark
>> >
>> >-----Original Message-----
>> >From: Kessler CTR Mark J [mailto:mark.kessler.ctr@usmc.mil]
>> >Sent: Monday, July 29, 2013 1:43 PM
>> >To: dev@flex.apache.org
>> >Subject: RE: [FlexJS] Handling chrome elements
>> >
>> > I've gotten used to being able to do Type checks with "is". It also
>> >stands out as a different format visually. I think the only problem
>> >with that change is, the child couldn't be null/undefined. It would have
>> >to be able to run that method. Whereas the current "is" can compare the
>> >datatype with it being null/undefined.
>> >
>> >
>> >-Mark
>> >
>> >-----Original Message-----
>> >From: Erik de Bruin [mailto:erik@ixsoftware.nl]
>> >Sent: Monday, July 29, 2013 12:59 PM
>> >To: dev@flex.apache.org
>> >Subject: Re: [FlexJS] Handling chrome elements
>> >
>> >Ah, the "is" issue.
>> >
>> >We don't seem to be able to get out from under a 'helper' method (or
>> >whatever the term-du-jour is for that thing) and a 'storage' property.
>> >
>> >Personally I like to go from this AS:
>> >
>> >if (child is IChrome)
>> >
>> >to this JS:
>> >
>> >if (child.is(IChrome))
>> >
>> >That would make it relatively easy to work with it in the cross
>> >compiler. Another possibility is to have a global function, but I
>> >don't like that very much.
>> >
>> >Thoughts?
>> >
>> >EdB
>> >
>> >
>> >
>> >On Mon, Jul 29, 2013 at 4:23 PM, Alex Harui <ah...@adobe.com> wrote:
>> >> Thanks for that. I'm more interested in the runtime use of interfaces.
>> >> What is the JS output for this AS?
>> >>
>> >> if (child is IChrome)
>> >>
>> >> It looked like FalconJS was going to create a $implements object on each
>> >> class and "is" code would test against that. What should we do for
>> >> FalconJX?
>> >>
>> >> Thanks,
>> >> -Alex
>> >>
>> >>
>> >> On 7/28/13 11:50 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>> >>
>> >>>More on how to write the JS side:
>> >>>
>> >>>
>> https://developers.google.com/closure/compiler/docs/js-for-compiler#tags
>> >>>
>> >>>Search for '@implements'. It has a short but sweet example.
>> >>>
>> >>>EdB
>> >>>
>> >>>
>> >>>
>> >>>On Mon, Jul 29, 2013 at 8:43 AM, Erik de Bruin <er...@ixsoftware.nl>
>> >>>wrote:
>> >>>>>> >Also IChrome (looks like a Marker Interface) could lead to a subtle
>> >>>>>> >problem
>> >>>>>> >on the JS side. I have not been following the conversation on how
>> >>>>>>to deal
>> >>>>>> >with Interfaces on the JS side. If we are planning on using 'duck
>> >>>>>> >typing',
>> >>>>>> >then we could run into issues with empty interfaces. Or am I
>> >>>>>>missing
>> >>>>>> >something here?
>> >>>>>> I'm not sure what we'll end up doing for interfaces on JS. It looks
>> >>>>>>like
>> >>>>>> some compiler code expects to list interfaces in an $implements
>> >>>>>>property
>> >>>>>> object.
>> >>>>>>
>> >>>>>
>> >>>>> Can someone shine some light on this? Erik, Michael?
>> >>>>
>> >>>> Interfaces on the JS side are implemented for the Closure Compiler
>> >>>> using the @interface for declaration and the @implements JSDoc
>> >>>> annotation. FalconJx knows about this, so - with caution and testing -
>> >>>> you should be able to approach interfaces the same in JS as in AS.
>> >>>>
>> >>>> Let me know if I can help out with some example code or something.
>> >>>> Also, if you run into problems, I can alway crack open FalconJx and
>> >>>> create the solution you would like to see.
>> >>>>
>> >>>> EdB
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Ix Multimedia Software
>> >>>>
>> >>>> Jan Luykenstraat 27
>> >>>> 3521 VB Utrecht
>> >>>>
>> >>>> T. 06-51952295
>> >>>> I. www.ixsoftware.nl
>> >>>
>> >>>
>> >>>
>> >>>--
>> >>>Ix Multimedia Software
>> >>>
>> >>>Jan Luykenstraat 27
>> >>>3521 VB Utrecht
>> >>>
>> >>>T. 06-51952295
>> >>>I. www.ixsoftware.nl
>> >>
>> >
>> >
>> >
>> >--
>> >Ix Multimedia Software
>> >
>> >Jan Luykenstraat 27
>> >3521 VB Utrecht
>> >
>> >T. 06-51952295
>> >I. www.ixsoftware.nl
>>
>>
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl