I think the idea was to swap out the view in initialView at runtime, but multiple children of initialView is not supported.
I don’t know that swapping views was ever tested though. Harbs > On Feb 19, 2017, at 2:17 AM, Justin Mclean <jus...@classsoftware.com> wrote: > > Hi, > > This code compile fine but gives a run time error it looks like only view2 > exists. I assume an initialView can only have one view? > > <?xml version="1.0" encoding="utf-8"?> > <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:js="library://ns.apache.org/flexjs/basic" > applicationComplete="init()"> > > <fx:Script><![CDATA[ > public function init():void { > text1.text = "Visible"; > text2.text = "Hidden"; > } > ]]></fx:Script> > > <js:valuesImpl> > <js:SimpleCSSValuesImpl/> > </js:valuesImpl> > > <js:initialView> > <js:View id="view1" visible="true" percentWidth="100" > percentHeight="100"> > <js:Label id="text1" text="View 1" /> > </js:View> > <js:View id="view2" visible="false" percentWidth="100" > percentHeight="100"> > <js:Label id="text2" text="View 2" /> > </js:View> > </js:initialView> > > </js:Application> > > Justin