Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3326CF7B1 for ; Sat, 30 Mar 2013 15:55:33 +0000 (UTC) Received: (qmail 58953 invoked by uid 500); 30 Mar 2013 15:55:32 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 58503 invoked by uid 500); 30 Mar 2013 15:55:32 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 58477 invoked by uid 99); 30 Mar 2013 15:55:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Mar 2013 15:55:31 +0000 X-ASF-Spam-Status: No, hits=-1.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aharui@adobe.com designates 64.18.1.31 as permitted sender) Received: from [64.18.1.31] (HELO exprod6og113.obsmtp.com) (64.18.1.31) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Mar 2013 15:55:26 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob113.postini.com ([64.18.5.12]) with SMTP ID DSNKUVcK2SVL65b+gYXpr12bSAECzJs9lZ42@postini.com; Sat, 30 Mar 2013 08:55:05 PDT Received: from inner-relay-4.eur.adobe.com (inner-relay-4.adobe.com [193.104.215.14]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r2UFpu1v001257 for ; Sat, 30 Mar 2013 08:51:56 -0700 (PDT) Received: from nahub02.corp.adobe.com (nahub02.corp.adobe.com [10.8.189.98]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id r2UFt2cF025819 for ; Sat, 30 Mar 2013 08:55:03 -0700 (PDT) Received: from NAMBX02.corp.adobe.com ([10.8.127.96]) by nahub02.corp.adobe.com ([10.8.189.98]) with mapi; Sat, 30 Mar 2013 08:55:02 -0700 From: Alex Harui To: "dev@flex.apache.org" Date: Sat, 30 Mar 2013 08:55:00 -0700 Subject: Re: [FalconJx] progress update Thread-Topic: [FalconJx] progress update Thread-Index: Ac4tWTKb8PvTEkjERUChVHnbaW2SvQABbxjr Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-Entourage/13.16.0.130206 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org I put your app in the debugger and get the same exception. And selecting from the dropdownlist doesn't change anything. On 3/30/13 8:13 AM, "Erik de Bruin" wrote: > Maybe I'm doing something wrong... the example on my p.a.o works for you? >=20 > http://people.apache.org/~erikdebruin/flexjs/ >=20 > Maybe try Chrome? >=20 > EdB >=20 >=20 >=20 > On Sat, Mar 30, 2013 at 4:01 PM, Alex Harui wrote: >> I'm not seeing anything like that in the HTML wrapper. Safari is defini= tely >> throwing on exception on "new Event". Any idea what I'm doing wrong? >>=20 >>=20 >> On 3/30/13 7:54 AM, "Erik de Bruin" wrote: >>=20 >>> I left out FlexGlobals on purpose, I plan to bring the Google Closure >>> way of dealing with events to FlexJS. The GC way is not dependent on >>> DOM based events and fits very snugly with the way Flex handles >>> events. >>>=20 >>> In the mean time I've a method in the "main" HTML that is called Event >>> and that passes the event through to FlexGlobals for now. >>>=20 >>> EdB >>>=20 >>>=20 >>>=20 >>> On Sat, Mar 30, 2013 at 3:47 PM, Alex Harui wrote: >>>> Hi Erik, >>>>=20 >>>> I finally got time to try to switch over to FalconJX. It produces js = files >>>> and the app shows up, but the console shows an exception and the >>>> interactivity of the application is mostly broken because the generate= d js >>>> code has snippets like this: >>>>=20 >>>> models.MyModel.prototype.set_labelText =3D function(value) { >>>> var self =3D this; >>>> if (value !=3D self._labelText) { >>>> self._labelText =3D value; >>>> self.dispatchEvent(new Event("labelTextChanged")); >>>> } >>>> }; >>>>=20 >>>> In the FalconJS output, we are calling FlexGlobals.newObject because E= vent >>>> is a special class in the browser that can't be instantiated via "new"= and >>>> FlexJS is using these DOM Events. >>>>=20 >>>> Did I miss a flag, or can I go about trying to intercept these calls a= nd >>>> have them call FlexGlobals.newObject instead? >>>>=20 >>>> -Alex >>>>=20 >>>>=20 >>>> On 3/29/13 11:58 AM, "Erik de Bruin" wrote: >>>>=20 >>>>> Ok, we're back in business! I think this time I have been working wit= h >>>>> the right version of FlexJS (the one with the timer and the drop down >>>>> list?) and it looks to work as advertised: >>>>>=20 >>>>> http://people.apache.org/~erikdebruin/flexjs/ >>>>>=20 >>>>> Time to get packing for the long flight ;-) >>>>>=20 >>>>> EdB >>>>>=20 >>>>>=20 >>>>>=20 >>>>> On Fri, Mar 29, 2013 at 3:15 PM, Erik de Bruin w= rote: >>>>>> Ah, and there's plenty left for you to "learn" from :-) >>>>>>=20 >>>>>> EdB >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> On Fri, Mar 29, 2013 at 2:30 PM, Alex Harui wrote= : >>>>>>> No worries. Might be a good way for me to learn how it works by ge= tting >>>>>>> it >>>>>>> to work. >>>>>>>=20 >>>>>>>=20 >>>>>>> On 3/29/13 12:31 AM, "Erik de Bruin" wrote: >>>>>>>=20 >>>>>>>> Uh oh... Turns out I was testing against an outdated ASJS lib >>>>>>>> (pre-fb614905ac), so FalconJx DOESN'T WORK against the current >>>>>>>> iteration of FlexJS. Sorry about that. I will work on that today, = but >>>>>>>> I don't have a lot of time, so it might be a while before I can ca= tch >>>>>>>> up, due to next week's travel to the land of golden opportunity. >>>>>>>>=20 >>>>>>>> EdB >>>>>>>>=20 >>>>>>>> On Thu, Mar 28, 2013 at 5:24 PM, Erik de Bruin >>>>>>>> wrote: >>>>>>>>> And another update (things are going much better than I expected)= : >>>>>>>>> FalconJx can now emit a fully functional version of the >>>>>>>>> FlexJSTest_again demo application. You can see it in action here >>>>>>>>> (provided you use Chrome or Firefox, I just noticed): >>>>>>>>>=20 >>>>>>>>> http://people.apache.org/~erikdebruin/flexjs/ >>>>>>>>>=20 >>>>>>>>> Onwards and upwards ;-) >>>>>>>>>=20 >>>>>>>>> EdB >>>>>>>>>=20 >>>>>>>>>=20 >>>>>>>>> On Wed, Mar 27, 2013 at 9:58 PM, Erik de Bruin >>>>>>>>> wrote: >>>>>>>>>> I'd have to look into it for specifics, but of the top of my hea= d it >>>>>>>>>> seems that this most depends on the implementation in the FlexJS= JS >>>>>>>>>> framework. Emitting the strings required by that framework shoul= d >>>>>>>>>> really be easy enough. If needed we can "look forward" into AST = to >>>>>>>>>> look for binding information. I do this in several other places >>>>>>>>>> already. Even the binding expressions shouldn't be too much of a >>>>>>>>>> problem, again depending on how this will be handled by the JS >>>>>>>>>> framework. >>>>>>>>>>=20 >>>>>>>>>> EdB >>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>> On Wed, Mar 27, 2013 at 9:36 PM, Alex Harui w= rote: >>>>>>>>>>> [Bindable] results in extra codegen. Binding expressions with = {} is >>>>>>>>>>> a >>>>>>>>>>> whole >>>>>>>>>>> other ball of work. >>>>>>>>>>>=20 >>>>>>>>>>> I think in FalconJX you might have to modify the node tree in >>>>>>>>>>> several >>>>>>>>>>> places >>>>>>>>>>> when you hit a [Bindable] node. >>>>>>>>>>>=20 >>>>>>>>>>> It isn't working correctly in FalconJS either, but my "customer= " >>>>>>>>>>> needs >>>>>>>>>>> it >>>>>>>>>>> so >>>>>>>>>>> I'm hacking a fix. >>>>>>>>>>>=20 >>>>>>>>>>>=20 >>>>>>>>>>> On 3/27/13 1:28 PM, "Erik de Bruin" wrote: >>>>>>>>>>>=20 >>>>>>>>>>>> No, not yet. How is this set up in FlexJS? I'm sure I can read >>>>>>>>>>>> Metadata >>>>>>>>>>>> and >>>>>>>>>>>> Databinding information, so I guess it depends on the requirem= ents >>>>>>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>> emitted JS if I can easily implement this ;-) >>>>>>>>>>>>=20 >>>>>>>>>>>> EdB >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>> On Wednesday, March 27, 2013, Alex Harui wrote: >>>>>>>>>>>>=20 >>>>>>>>>>>> Does FalconJX handle [Bindable]? My "customer" is using it. >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>> On 3/27/13 11:56 AM, "Michael Schmalle" >>>>>>>>>>>> wrote: >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>> Quoting Erik de Bruin : >>>>>>>>>>>>=20 >>>>>>>>>>>> Another one popped into my head just now: I have a gut feeling >>>>>>>>>>>> there >>>>>>>>>>>> is a bit of circular logic going on in the whole 'backend', >>>>>>>>>>>> 'blockwalker' and 'emitter' construct. More specifically in th= e way >>>>>>>>>>>> the references to them are passed around as arguments in the >>>>>>>>>>>> constructors for the various classes. But I can't wrap around = it >>>>>>>>>>>> well >>>>>>>>>>>> enough to figure out whether it's wrong and if so, what might = be >>>>>>>>>>>> done >>>>>>>>>>>> about it. Don't get me wrong, it works well, it's just that it >>>>>>>>>>>> somehow >>>>>>>>>>>> isn't "elegant". And that's in no way a comment on the >>>>>>>>>>>> effectiveness >>>>>>>>>>>> or quality of your code, just something I thought I'd share an= d see >>>>>>>>>>>> what you think. >>>>>>>>>>>>=20 >>>>>>>>>>>> Actually I think it works fine. The problem you are facing is = with >>>>>>>>>>>> the >>>>>>>>>>>> MXML emitter I am sure. This adds complexity to what you are t= rying >>>>>>>>>>>> to >>>>>>>>>>>> accomplish and it is circular from the perspective of using AS >>>>>>>>>>>> within >>>>>>>>>>>> MXML. >>>>>>>>>>>>=20 >>>>>>>>>>>> There is a buffer writer(output stream), a writer, a visitor a= nd >>>>>>>>>>>> emitter. >>>>>>>>>>>>=20 >>>>>>>>>>>> Each one takes a dependency of its parent. Trust me, if there = is a >>>>>>>>>>>> child that knows about its parent I am blind. Like I said, the >>>>>>>>>>>> block >>>>>>>>>>>> walker is a visitor and the emitter is a visitor. You cannot e= scape >>>>>>>>>>>> the fact there is recursion. >>>>>>>>>>>>=20 >>>>>>>>>>>> If you can think of a more elegant way to set it up, by all m= eans >>>>>>>>>>>> write a prototype. Remember, I wrote this with an atom bomb un= der >>>>>>>>>>>> me >>>>>>>>>>>> and lighting in the sky, there may be parts that could be >>>>>>>>>>>> logicalized. >>>>>>>>>>>>=20 >>>>>>>>>>>> I have another full compiler in Randori that I am going to use= as a >>>>>>>>>>>> proof of concept with compiler plugins and my ASDoc compiler I >>>>>>>>>>>> wrote. >>>>>>>>>>>> So I guess we both can experiment, we can agree to leave the c= ore >>>>>>>>>>>> alone for the time being. >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>> EdB >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>> On Wed, Mar 27, 2013 at 7:41 PM, Erik de Bruin >>>>>>>>>>>> wrote: >>>>>>>>>>>> Mike, >>>>>>>>>>>>=20 >>>>>>>>>>>> Just kidding ;-) >>>>>>>>>>>>=20 >>>>>>>>>>>> I'm really happy with FalconJx, once you get to know it it's a >>>>>>>>>>>> pleasure to work with. I hope my last commits didn't give you = any >>>>>>>>>>>> additional work in your other projects? I did my best to leave= all >>>>>>>>>>>> the >>>>>>>>>>>> APIs alone. >>>>>>>>>>>>=20 >>>>>>>>>>>> There are plenty of TODOs in the code, and I would also like t= o >>>>>>>>>>>> suggest some kind of code review or something (I'm not used to >>>>>>>>>>>> working >>>>>>>>>>>> in groups, but that seems like a nice thing to do), since I've= been >>>>>>>>>>>> piling on stuff. I did my best to keep everything clean and in= line >>>>>>>>>>>> with the spirit of the rest of the code, but there are some ar= eas >>>>>>>>>>>> where I'd like to have a second opinion. Like with the code th= at is >>>>>>>>>>>> copied between the DOC and JS emitters, seems there might be r= oom >>>>>>>>>>>> for >>>>>>>>>>>> improvement there. Also of note is the way I've implemented th= e AS >>>>>>>>>>>> emitting within the MXML emitter, not really sure if I did the >>>>>>>>>>>> right >>>>>>>>>>>> thing there. And finally (not really, but this is all I can th= ink >>>>>>>>>>>> of >>>>>>>>>>>> for now, after the marathon hacking I did today) there is the = whole >>>>>>>>>>>> "programming to interfaces, not implementations" part that we >>>>>>>>>>>> nearly >>>>>>>>>>>> adhere to, but not quite, we might have another look at that a= s >>>>>>>>>>>> well. >>>>>>>>>>>>=20 >>>>>>>>>>>> EdB >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>> On Wed, Mar 27, 2013 at 7:33 PM, Michael Schmalle >>>>>>>>>>>> wrote: >>>>>>>>>>>> No thats not what I meant. >>>>>>>>>>>>=20 >>>>>>>>>>>> I am saying with the Randori project compiler, I have not had = to >>>>>>>>>>>> touch the >>>>>>>>>>>> core framework for weeks and it is compiling 1000's of lines o= f >>>>>>>>>>>> code. >>>>>>>>>>>> And >>>>>>>>>>>> application code now. >>>>>>>>>>>>=20 >>>>>>>>>>>> What I meant to say was, the design keeps people in the correc= t >>>>>>>>>>>> spaces. :) >>>>>>>>>>>>=20 >>>>>>>>>>>> Note; I AM SURE there are as3 bugs coming, its just nice not >>>>>>>>>>>> having to chase >>>>>>>>>>>> them right now. >>>>>>>>>>>>=20 >>>>>>>>>>>> Mike >>>>>>>>>>>> Alex Harui >>>>>>>>>>>> Flex SDK Team >>>>>>>>>>>> Adobe Systems, Inc. >>>>>>>>>>>> http://blogs.adobe.com/aharui >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>=20 >>>>>>>>>>> -- >>>>>>>>>>> Alex Harui >>>>>>>>>>> Flex SDK Team >>>>>>>>>>> Adobe Systems, Inc. >>>>>>>>>>> http://blogs.adobe.com/aharui >>>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>> -- >>>>>>>>>> Ix Multimedia Software >>>>>>>>>>=20 >>>>>>>>>> Jan Luykenstraat 27 >>>>>>>>>> 3521 VB Utrecht >>>>>>>>>>=20 >>>>>>>>>> T. 06-51952295 >>>>>>>>>> I. www.ixsoftware.nl >>>>>>>>>=20 >>>>>>>>>=20 >>>>>>>>>=20 >>>>>>>>> -- >>>>>>>>> Ix Multimedia Software >>>>>>>>>=20 >>>>>>>>> Jan Luykenstraat 27 >>>>>>>>> 3521 VB Utrecht >>>>>>>>>=20 >>>>>>>>> T. 06-51952295 >>>>>>>>> I. www.ixsoftware.nl >>>>>>>>=20 >>>>>>>>=20 >>>>>>>=20 >>>>>>> -- >>>>>>> Alex Harui >>>>>>> Flex SDK Team >>>>>>> Adobe Systems, Inc. >>>>>>> http://blogs.adobe.com/aharui >>>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> -- >>>>>> Ix Multimedia Software >>>>>>=20 >>>>>> Jan Luykenstraat 27 >>>>>> 3521 VB Utrecht >>>>>>=20 >>>>>> T. 06-51952295 >>>>>> I. www.ixsoftware.nl >>>>>=20 >>>>>=20 >>>>=20 >>>> -- >>>> Alex Harui >>>> Flex SDK Team >>>> Adobe Systems, Inc. >>>> http://blogs.adobe.com/aharui >>>>=20 >>>=20 >>>=20 >>=20 >> -- >> Alex Harui >> Flex SDK Team >> Adobe Systems, Inc. >> http://blogs.adobe.com/aharui >>=20 >=20 >=20 >=20 > -- > Ix Multimedia Software >=20 > Jan Luykenstraat 27 > 3521 VB Utrecht >=20 > T. 06-51952295 > I. www.ixsoftware.nl --=20 Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui