> I just took a look at a small part of your implementation and I see that our > approaches are fundamentally different. You parse the stylesheet, set static > properties on the Component class or some subclass thereof, and then use that > information somewhere along the line to perform the styling.
That's correct. Based on what I have read, I believe styling in Flex works similarly. > I parse the stylesheet into a "stylesheet document" and apply it to a > component hierarchy, presumably after it's been constructed by a serializer. This certainly works, but it requires traversing the component tree twice (once to build it and again to style it). This may have performance implications, especially for large applications. The current approach applies styling as the tree is constructed, which requires only one traversal. > Where/when do you set the styles in your implementation? Typed styles are applied when the component is constructed, in Component#setSkin(). Named styles are applied in setStyleName() or setStyleNames(). Instance styles are applied in setStyles(), as before.
