Have you declared cityArray?
yeah i have
<mx:Canvas width="100%" xmlns:Controls="com.Controls.*" creationComplete="init()" height="100%" xmlns:mx="http://www.adobe.com/2006/mxml" >
private var objIcity:ICity;
private var cityCount:int;
private var cityArray:Array;
private var lblMsg:Label;
private var cityParam:City;
private function init():void
lblMsg.text="Please add a city";
By default the ViewStack only creates the first "view" and its children. Set creationPolicy="all" and you should have no error.
Setting creationPolicy="all" can be a performance hit if there are many views with lots of UI. In that case you may need to find another way to ensure anything that must exist at creationComplete has been initialized.
If this post answers your question or helps, please mark it as such. Thanks!
Adobe Flex Development and Support Services