Ok here is the deal.

As of now Alex is using a descriptor type emittion. Creating "init" objects that initialize a DOM instance.

So the ASJS emitter would load up a values object that when the component is created, is populated by those descriptors.

Your method is different. Put it this way, I am not writing anything concrete with either right now. Last night I discovered there are a couple different ways to do this and I really need to be careful to not couple the walker with a certain implementation like I was just about to do with Alex's ASJS descriptors.

I need a higher level and that is what I am working on. Basically with what I am writing, in your emitter, you will be able to visit and "InstanceNode" and create code like you have above. The instance node in MXML is the Button tag you wrote as an example.

By doing this, I can also write an emitter that when it visits an InstanceNode for ALex, will create a descriptor of the properties he needs and save that into the descriptors array.

Does this make sense?

Mike



Quoting Erik de Bruin <e...@ixsoftware.nl>:

Mike,

Just to ease my confused mind:

Of course, I am writing things along the same lines as the AS visitors BUT
there is a semantic difference that we are not exactly translating MXML AST
to js, so I need a bit more time figuring out the abstractions.

"not EXACTLY translating", what does that mean? To what else but js
will we be translating MXML? Won't I be able to emit this:

<s:Button id="myButton" x="25" y="100" label="Click me" />

to:

var myButton = new Button();
myButton.x = 25;
myButton.y = 100;
myButton.label = "Click me";

(overly simplified example, but you get my drift)

EdB



--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

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


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

Reply via email to