I have an .as code file that loops through creating tab panes with combo boxes on them, the data is retrieved from a ms cube etc, etc, etc. :-)
I was about to take this prototyping code and create a tab pane class and a combo box class (including the service that goes and gets the cube dimension data that populates the combo) when the following question occurred to me: The .as file is one block of code that creates all these gui objects at run time. If this code is made into classes that "create themselves", does it by definition create a lot more overhead? For example, each combo box instance would instantiate a service var to go and get its data, whereas in the .as file there is one service var that is reused. Also each tab instance and combo instance would encapsulate methods for their creation, and presumably would reside in memory while the instance is living. Flex probably keeps one copy in memory of a class(?) so there are not 10 copies of MyComboBox.init() for 10 comboboxes in memory, but doesn't the .as code file just run its code and then exit leaving a zero footprint in memory? This Flex Dashboard app is a la SharePoint where the whole app is built at runtime from XML templates and the code loops through the XML constructing the gui. I do not know enough about the internals to know if 1. Running all the construction in the .as code file is low overhead because the .as code goes away after it is run? 2. Creating self-contained classes to do their own construction is high overhead because all that code will sit in memory for the duration of the app? Having classes that handle themselves seems more elegant, but at what expense? TIA, Mic (I know what I mean :-) )

