Created
October 20, 2011 13:00
-
-
Save Ondina/1301083 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
preinitialize="application_preinitializeHandler(event)"> | |
<fx:Script> | |
<![CDATA[ | |
import com.robotlegs.demos.robotlegsincremental.ApplicationContext; | |
import mx.events.FlexEvent; | |
protected var context:ApplicationContext; | |
protected function application_preinitializeHandler(event:FlexEvent):void | |
{ | |
context=new ApplicationContext(this); | |
} | |
]]> | |
</fx:Script> | |
<s:ViewNavigator id="MainViewNavigator" | |
label="Main" | |
width="100%" | |
height="100%" firstView="com.robotlegs.demos.robotlegsincremental.views.components.SomeView"/> | |
</s:Application> | |
------ | |
<s:TabbedViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
preinitialize="application_preinitializeHandler(event)" | |
name="ContextView"> | |
<fx:Script> | |
import com.robotlegs.demos.robotlegsincremental.ApplicationContext; | |
import mx.events.FlexEvent; | |
protected var context:ApplicationContext; | |
protected function application_preinitializeHandler(event:FlexEvent):void | |
{ | |
context=new ApplicationContext(this); | |
} | |
</fx:Script> | |
<s:ViewNavigator label="SomeView" | |
width="100%" | |
height="100%" | |
firstView="com.robotlegs.demos.robotlegsincremental.views.components.SomeView"/> | |
<s:ViewNavigator label="AnotherView" | |
width="100%" | |
height="100%" | |
firstView="com.robotlegs.demos.robotlegsincremental.views.components.AnotherView"/> | |
</s:TabbedViewNavigatorApplication> | |
----- | |
Where SomeView looks like this: | |
----- | |
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
title="SomeView" name="SomeView"> | |
<fx:Script> | |
import mx.collections.ArrayCollection; | |
public function setListDataProvider(dataProvider:ArrayCollection):void | |
{ | |
someViewList.dataProvider=dataProvider; | |
} | |
</fx:Script> | |
<s:DropDownList id="someViewList" | |
x="10" | |
y="18" | |
width="228" | |
prompt="someViewList" | |
labelField="somename"/> | |
</s:View> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment