First stub dialog for showing your own GPX traces
[potlatch2.git] / net / systemeD / potlatch2 / mygpx / MyGpxDialog.mxml
1 <?xml version="1.0" encoding="utf-8"?>
2 <mx:TitleWindow
3         xmlns:mx="http://www.adobe.com/2006/mxml"
4         layout="vertical" showCloseButton="true"
5         horizontalAlign="center" title="MyGpx Files"
6         width="600" height="400"
7         verticalGap="0">
8   <mx:Script><![CDATA[
9     import mx.managers.PopUpManager;
10     import mx.events.CloseEvent;
11     import mx.core.Application;
12
13     import net.systemeD.halcyon.connection.*;
14
15     public function init():void {
16         PopUpManager.addPopUp(this, Application(Application.application), true);
17         PopUpManager.centerPopUp(this);
18         this.addEventListener(CloseEvent.CLOSE, myGpxDialog_close);
19
20         // store whether the user has seen the help dialog before
21         var obj:SharedObject = SharedObject.getLocal("user_state");
22         obj.setProperty("help_shown","true");
23     }
24
25     private function myGpxDialog_close(evt:CloseEvent):void {
26         PopUpManager.removePopUp(this);
27     }
28
29     private function fetchList():void {
30         Connection.getConnectionInstance().fetchUserTraces();
31         results.text="yes";
32     }
33               ]]>
34   </mx:Script>
35
36   <mx:Text text="foo" id="results" />
37   <mx:Button label="fetch" click="fetchList()" />
38 </mx:TitleWindow>