I'm having some troubles with Flex with regards to changing controls on different viewstack panels. At runtime, certain controls aren't accessible and come back as null. Here's an example structure:
viewstack1
canvasPeople
datagridPeople
canvasDetails
tabNavigator1
canvasPersonDetail
txtLastname
canvasPersonOptions
comboboxOccupation
I have a "click" handler in datagrid1 set up to activate canvasB (viewstack1.selectedChild = canvasB) and the detail options box (tabNavigator1.selectedChild = canvasPersonOptions). The former works OK but the latter returns an error about accessing a null object, because at the moment the user clicks on an item in the People datagrid, the tabNavigator1 is null, as is any control underneath it. (its parent, though (canvasDetails), is addressable.) Currently this is a tiny application, so it's not like it's waiting to load the items. Is there a way to control how Flex renders controls so they're accessible before the user sees them? I don't know if this is specific to the viewStack control.