1 Reply Latest reply on Oct 4, 2006 3:20 PM by brocej

    Viewstack Bug?

    brocej
      The code below generates an error. Is this a bug or is it the fact that you cannot dynamically change a property of a component if it is not the currently visible one in the viewstack?

      quote:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="initApp()">

      <mx:Script>
      <![CDATA[

      public function initApp() : void {
      text1.text = "Hello World";
      text2.text = "Hello World";
      }

      ]]>
      </mx:Script>

      <mx:TabBar dataProvider="{viewstack}"/>

      <mx:ViewStack id="viewstack" width="100%">

      <mx:Canvas label="text1">
      <mx:Text id="text1"/>
      </mx:Canvas>

      <mx:Canvas label="text2">
      <mx:Text id="text2"/>
      </mx:Canvas>

      </mx:ViewStack>

      </mx:Application>