Create ViewStack in Actionscript with creationPolicy = "auto"
Posted
by
Ivan Zamylin
on Stack Overflow
See other posts from Stack Overflow
or by Ivan Zamylin
Published on 2012-10-08T12:03:21Z
Indexed on
2012/10/10
15:37 UTC
Read the original article
Hit count: 262
actionscript-3
|flex4
In MXML, when I add components to ViewStack
and creationPolicy
is auto
, components are not instantiated until I switch to them. Say, I have the following code:
<mx:ViewStack creationPolicy="auto">
<s:NavigatorContent>
<s:DataGrid id="dg1" width="300"/>
</s:NavigatorContent>
<s:NavigatorContent>
<s:DataGrid id="dg2" width="100"/>
</s:NavigatorContent>
</mx:ViewStack>
How do I replicate this behavior in ActionScript? The problem is that my DataGrids hold large chunks of data, and thus I don't want them to be created at the same time.
© Stack Overflow or respective owner