0
在Flex Mobile应用程序中有没有一种方法来侦听<s:View>
的事件,该事件在<s:ViewNavigator>
之内?比方说,我有如下应用结构:Flex移动侦听事件<s:View>
主要应用:
<s:TabbedViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="databaseConnection(event)">
<s:ViewNavigator id="tasks" width="100%" height="100%"
label="Tasks" firstView="views.TasksView"
title="Tasks" icon="@Embed('assets/icons/tasks.png')">
</s:ViewNavigator>
</s:TabbedViewNavigatorApplication>
view.TasksView:
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:Button label="New View" click="{navigator.pushView(views.AddTask)}"/>
</s:View>
view.AddTask:
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="{dispatchEvent(new Event("happened"))}">
<fx:Metadata>
[Event(name="happened", type="flash.events.Event")]
</fx:Metadata>
</s:View>
说我想听听happened
事件回到我的主应用程序中。我怎样才能听这样的事件?
谢谢你的时间。