Quoting Gordon Smith <gosm...@adobe.com>:

 I thought you said MXML shouldn't be used to create javascript.

I don't have a clear recollection. I was probably recommending that MXML be converted into a data structure or a bytestream that would get interpreted by a small bit of JavaScript (or any other language). This is what Alex has been recommending, rather than turning MXML into JavaScript source code. (It's conceptually similar to the old approach of generating UIComponentDescriptors in early version of Flex, which could then be instantiated into actualy component instances.) But if you prefer to turn MXML into JavaScirpt source code, it should be straightforward to do that. The MXMLClassDirectiveProcessor is a simple recursive descent through the MXML AST. The main complexity is that it can't simply generate a continuous stream of code in tree order. For example, an attribute value that is a databinding expression has to generate all sorts of extra stuff like Watcher instances in other places.

- Gordon


Ok I think I see where things went wrong in my head, thanks for the clarifications. What Alex is doing right now is basically what you said, he is making javascript but as descriptors and that is what I was thinking as well.

So I guess everything is straight in my head, I was correct in you saying there is really no value in converting MXML to a javascript class based on the MXML itself. It worth creating descriptors that get initialized which I what Alex is currently doing with his implementation.

This is what I will copy for now using the walker/visitor pattern I have been using.

Thanks again Gordon, let me reiterate, it has been a pleasure using your compiler framework. :)

--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com



--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com

Reply via email to