Remove the deprectated Application.application
authorAndy Allan <andy@gravitystorm.co.uk>
Wed, 29 Jun 2011 14:35:36 +0000 (15:35 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Wed, 29 Jun 2011 14:35:36 +0000 (15:35 +0100)
net/systemeD/potlatch2/TagViewer.mxml
net/systemeD/potlatch2/mapfeatures/editors/RouteEditor.mxml
net/systemeD/potlatch2/save/SaveManager.as

index 3aa7448054806782909699e83bd0488973d29fdb..0329ecfdb5e5dc10372100a27eedd0ea2aa742e4 100644 (file)
 
       private function editRelation(id:Number):void {
           var panel:RelationEditorPanel = RelationEditorPanel(
-              PopUpManager.createPopUp(Application(Application.application), RelationEditorPanel, true));
+              PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), RelationEditorPanel, true));
           panel.setRelation(connection.getRelation(id));
           PopUpManager.centerPopUp(panel);
       }
        public function selectRelationMenu(event:MenuEvent):void {
                var rel:Relation=rowData.relation;
                var entities:Array;
-               var controller:EditController=Application.application.theController;
+               var controller:EditController=FlexGlobals.topLevelApplication.theController;
                switch (event.index) {
                        case 0: // Select all members
                                entities=selectedEntity.entities.concat(rel.memberEntities);
index 53e9ad668e06bb966db573968fffaf8271a9a905..9cfb7b7902cd1dde9be891d9a9404d0fd593a090 100644 (file)
@@ -33,7 +33,7 @@
     public function routeClicked(event:Event):void {
         var relation:Object = RouteIcon(event.currentTarget).route;
         var panel:RelationEditorPanel = RelationEditorPanel(
-            PopUpManager.createPopUp(Application(Application.application), RelationEditorPanel, true));
+            PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), RelationEditorPanel, true));
         panel.setRelation(relation["relation"]);
         PopUpManager.centerPopUp(panel);
     }
index c2b95685b8d5fed04913726cfcd59932944941b4..9ea879df7d25a55d7acbe339a6302b8f1afbe24b 100644 (file)
@@ -4,6 +4,7 @@ package net.systemeD.potlatch2.save {
     import flash.net.*;
     import mx.managers.PopUpManager;
     import mx.core.Application;
+    import mx.core.FlexGlobals;
     import net.systemeD.halcyon.connection.*;
     import org.iotashan.oauth.*;
 
@@ -31,7 +32,7 @@ package net.systemeD.potlatch2.save {
 
         private function getNewToken(onCompletion:Function):void {
             var oauthPanel:OAuthPanel = OAuthPanel(
-                PopUpManager.createPopUp(Application(Application.application), OAuthPanel, true));
+                PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), OAuthPanel, true));
             PopUpManager.centerPopUp(oauthPanel);
                        oauthPanel.setConnection(_connection);
             
@@ -50,7 +51,7 @@ package net.systemeD.potlatch2.save {
         
         private function saveData():void {
             var saveDialog:SaveDialog = SaveDialog(
-                PopUpManager.createPopUp(Application(Application.application), SaveDialog, true));
+                PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), SaveDialog, true));
                        saveDialog.setConnection(_connection);
             PopUpManager.centerPopUp(saveDialog);