import mx.core.Application;
import net.systemeD.halcyon.connection.*;
+ import net.systemeD.potlatch2.save.*;
public function init():void {
PopUpManager.addPopUp(this, Application(Application.application), true);
PopUpManager.centerPopUp(this);
this.addEventListener(CloseEvent.CLOSE, myGpxDialog_close);
-
- // store whether the user has seen the help dialog before
- var obj:SharedObject = SharedObject.getLocal("user_state");
- obj.setProperty("help_shown","true");
}
private function myGpxDialog_close(evt:CloseEvent):void {
}
private function fetchList():void {
+ SaveManager.getAccessSorted();
Connection.getConnectionInstance().fetchUserTraces();
- results.text="yes";
+ results.text="fetching...";
}
]]>
</mx:Script>
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...
+ Connection.getConnectionInstance().setAppID(consumer);
+ Connection.getConnectionInstance().setAuthToken(accessToken);
+ }
+
private function save(callback:Function):void {
if ( consumer == null )
consumer = getConsumer();
else
callback();
}
-
+
private function getAccessToken():OAuthToken {
var key:String = Connection.getParam("oauth_token", null);
var secret:String = Connection.getParam("oauth_token_secret", null);