Attempting to force instantiation is usually a sign that you need to rethink your data flow. Use events to grab data from a model when the sub component is instantiated of shown.
Tracy Spratt, Lariat Services, development services available _____ From: [email protected] [mailto:[email protected]] On Behalf Of Mic Sent: Wednesday, August 19, 2009 3:41 PM To: [email protected] Subject: [flexcoders] How to force construction when creationPolicy="all' does not work? ViewStack.vsMainDash VBox.vbDrctrDash VBox.vbParmsAndDrills ViewStack.vsDashDrills VBox.CustLevel VBox.UDAC is the hierarchy. Run code .... vsMainDash.selectedChild = vbParmsAndDrills; vsDashDrills.selectedChild = vbCustLevel; ** null reference error Debug at line that errors does show vsDashDrills = null, whereas vsMainDash = ViewStack. I have tried splattering creationPolicy="all' everywhere - of course if I do this too high up I start getting null reference errors there. (If I OK the error the app does continue with everything displayed correctly so Flex does create what it should.) If creationPolicy="all' does not work, how do I force the ViewStack vsDashDrills into existence? TIA, Mic.

