Rework the GPX load button to use outerDocument and handle the lack of typing on...
authorAndy Allan <andy@gravitystorm.co.uk>
Sat, 24 Mar 2012 18:05:33 +0000 (18:05 +0000)
committerAndy Allan <andy@gravitystorm.co.uk>
Sat, 24 Mar 2012 18:05:33 +0000 (18:05 +0000)
net/systemeD/potlatch2/mygpx/MyGpxDialog.mxml

index 0bb40e4..f024c27 100644 (file)
@@ -26,7 +26,7 @@
               <s:GridItemRenderer>
                 <s:VGroup horizontalAlign="center" verticalAlign="middle" width="100%" height="100%">
                   <s:Button label="Load"
-                      click="parentDocument.loadFile(data)"/>
+                      click="outerDocument.loadFile(data)"/>
                 </s:VGroup>
               </s:GridItemRenderer>
             </fx:Component>
@@ -95,7 +95,8 @@
         return a.id - b.id
     }
 
-    public function loadFile(t:Trace):void {
+    public function loadFile(o:Object):void {
+        var t:Trace = Trace(o);
         t.addToMap();
     }