Rename getAccessSorted to ensureAccess, and accept a callback. Rework MyGPX accordingly
authorAndy Allan <gravitystorm@gmail.com>
Tue, 19 Oct 2010 10:10:39 +0000 (10:10 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Tue, 19 Oct 2010 10:10:39 +0000 (10:10 +0000)
net/systemeD/potlatch2/mygpx/MyGpxDialog.mxml
net/systemeD/potlatch2/save/SaveManager.as

index 11292b6bb3058f7c163e52533f8e95a8b36c9ad6..238815c764cf22de49e8d1ab2eda70918639db41 100644 (file)
@@ -30,9 +30,8 @@
         conn = Connection.getConnectionInstance();
         map = Globals.vars.root;
 
-        SaveManager.getAccessSorted();
         conn.addEventListener(Connection.TRACES_LOADED, onTracesLoaded);
-        fetchList();
+        SaveManager.ensureAccess(fetchList);
     }
 
     private function myGpxDialog_close(evt:CloseEvent):void {
index 55c412cff2a466f2fc5af0ba3d79a528211bdd94..3e9cdaa8338d78668b3c5d670cf52e052ad225f7 100644 (file)
@@ -15,13 +15,8 @@ package net.systemeD.potlatch2.save {
             instance.save(instance.saveData);
         }
 
-        public static function getAccessSorted():void {
-            // hacky hack of pond-like clarity
-            instance.save(instance.doNothing);
-        }
-
-        private function doNothing():void {
-            //hack hacky hack hack. Please look the other way...
+        public static function ensureAccess(callback:Function):void {
+            instance.save(callback);
         }
 
         private function save(callback:Function):void {