Better binding / event handling for loading the trace list
authorAndy Allan <gravitystorm@gmail.com>
Mon, 11 Oct 2010 17:04:13 +0000 (17:04 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Mon, 11 Oct 2010 17:04:13 +0000 (17:04 +0000)
net/systemeD/potlatch2/mygpx/MyGpxDialog.mxml

index 360cec5..a9ee8fe 100644 (file)
 
     private function onTracesLoaded(e:Event):void {
         results.text = "loaded!!";
+        // Although the connection emits a Connection.TRACES_LOADED event,
+        // I couldn't get the next binding to work properly. Emitting
+        // an event here does the trick
+        dispatchEvent(new Event("traces_loaded"));
     }
 
-    [Bindable(event=Connection.TRACES_LOADED)]
+    // [Bindable(event=Connection.TRACES_LOADED)]
+    [Bindable(event="traces_loaded")]
     private function get traces():Array {
         var conn:Connection = Connection.getConnectionInstance();
         return conn.getTraces();