Is it a good practise to do it in this way.. (access to global variable)
hi,
i ask, if practise in way:....
i have main.mxml code this:
<!-- main.mxml-->
......
<mx:script source="includes/main.as"/>
<!-- listapolis custom components in namespace oil-->
<oil:listapolis left="10" top="0" id="listapolis">
</oil:listapolis>
........
in main.as file have declared:
...
public var ac_php_results:arraycollection = new arraycollection();
...
now, use ac_php_results variable in custom components oil::listapolis, in way:
<!--listapolis.mxml-->
....
mx.core.application.application.ac_php_results.additem(.......);
....
this works, wonder if in way, not using mx.core.application.application.
without receive error, unknown variable.
best regards,
mariusz
i think confused domain of variable, "ac_php_results" directly used in application domain.
i think should create other singleton class used between application , custom component.
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment