I have a TabNavigator instance that I'm using as a container for a form. The form is split up in this way to conserve screen space. When the user clicks the 'submit' button on the bottom, I have a method that uses validators to validate all of the fields in each of the tabs.
The problem is that the tabs that have not been viewed by the user have not initialized their respective fields. This results in the 'source' property of each of the un-initialized fields to return 'null.' Flex then complains: 'unable to access null object reference.'
Is there a way to programmatically initialize the Containers in each tab so that I can validate the fields inside of them? I've tried to use the following code, but it doesn't seem to have any effect...
Quote:
var arr:Array = tabNavigator.getChildren();
for(var x:Number = 0; x < arr.length; x++){
arr[x].initialize();
arr[x].validateDisplayList();
arr[x].validateProperties();
arr[x].validateSize();
arr[x].validateNow();
}
|