Hello again,

I've been making some headway on my Spark experimentation, but I've run into 
another road block. I was wondering if someone would be willing to offer some 
possible solutions.

I'm trying to make a basic structured document. I would normally do this in 
Flex 3 by starting with the data and then creating some kind of factory to 
build the visual elements.

I was hoping that the new Spark architecture would allow me to bridge that gap 
by defining my document structure using Groups.

IE:
<s:MyDocument>
..<p:Page title="Page 1" />
..<p:Page title="Page 2">
....<p:Page title="Page 2.1" />
....<p:Page title="Page 2.2" />
..</p:Page>
..<p:Page title="Page 3" />
</s:MyDocument>

I'm sure you get the idea..

These pages are then laid out using a SparkSkin.

I need to be able to maintain a tree structure of document elements for various 
operations.

My initial plan was to capture this.contentGroup in the partAdded function, and 
update node references as needed. However, it turns out that the skin adds adds 
on an additional complexity to the element hierarchy (which makes sense once I 
saw it).

One solution is to recursively run up element.parent capturing my instances as 
I go, but I'm not sure if that's an ideal solution.

Is there a way to reference the mxml element hierarchy as it's listed in the 
group?

Any suggestions would be greatly appreciated.


Thanks!




Reply via email to