Here’s a tip which might be useful for some people. Sometimes when building a Flex/Adobe Air interface you may want to have form elements which are built across multiple views of a ViewStack, or TabNavigator. For example I have a contact form which has some rarely used fields contained in a secondary Tab in my form.
Problem with this approach is that the default value of a Container’s creationPolicy is ‘auto‘. This means child components are only created when they are needed. If your user never looks at the extra tabs/view stack layers then these form elements are not available if you need to get values or set values for them.
The Solution is to simple set the creationPolicy for your ViewStack or TabNavigator to ‘all‘. This will ensure that all child elements are created up front and are available when needed regardless if the user looks at them or not.
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.