Make the mygpx dialog set up the tokens first
[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     import net.systemeD.potlatch2.save.*;
15
16     public function init():void {
17         PopUpManager.addPopUp(this, Application(Application.application), true);
18         PopUpManager.centerPopUp(this);
19         this.addEventListener(CloseEvent.CLOSE, myGpxDialog_close);
20     }
21
22     private function myGpxDialog_close(evt:CloseEvent):void {
23         PopUpManager.removePopUp(this);
24     }
25
26     private function fetchList():void {
27         SaveManager.getAccessSorted();
28         Connection.getConnectionInstance().fetchUserTraces();
29         results.text="fetching...";
30     }
31               ]]>
32   </mx:Script>
33
34   <mx:Text text="foo" id="results" />
35   <mx:Button label="fetch" click="fetchList()" />
36 </mx:TitleWindow>