Skip to content

Instantly share code, notes, and snippets.

@Ondina
Created Oct 20, 2011
Embed
What would you like to do?
<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