flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-utilities] [refs/heads/develop] - close console window if it is open when app closes
Date Wed, 11 Jun 2014 05:18:32 GMT
Repository: flex-utilities
Updated Branches:
  refs/heads/develop 2936a3a4e -> 6ce4b8370


close console window if it is open when app closes


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/6ce4b837
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/6ce4b837
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/6ce4b837

Branch: refs/heads/develop
Commit: 6ce4b83708310097592461de66d2cd83585d7f85
Parents: 2936a3a
Author: Alex Harui <aharui@apache.org>
Authored: Tue Jun 10 22:17:44 2014 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Jun 10 22:17:44 2014 -0700

----------------------------------------------------------------------
 installer/src/InstallApacheFlex.mxml                           | 6 +++++-
 .../flex/packageflexsdk/view/components/ConsoleWindow.mxml     | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/6ce4b837/installer/src/InstallApacheFlex.mxml
----------------------------------------------------------------------
diff --git a/installer/src/InstallApacheFlex.mxml b/installer/src/InstallApacheFlex.mxml
index a9d1f66..b055fc3 100644
--- a/installer/src/InstallApacheFlex.mxml
+++ b/installer/src/InstallApacheFlex.mxml
@@ -2648,8 +2648,10 @@ variables are not required because the locations of these pieces are
known.
                 trace(text);
 		}
 		
+		private var console:ConsoleWindow;
 		private function showConsole(event:Event):void {
-			var console:ConsoleWindow = new ConsoleWindow();
+			if (!console || console.closed)
+				console = new ConsoleWindow();
 			console.messages = _messages;
 			console.open();
 			console.nativeWindow.x = this.nativeWindow.x + this.nativeWindow.width / 2 - console.nativeWindow.width
/ 2;
@@ -2677,6 +2679,8 @@ variables are not required because the locations of these pieces are
known.
 		private function closeApplication(event:Event):void {
 			// TODO only enable close button when finished or when an error occurs
 			// TODO anything we need to clean up?
+			if (console && !console.closed)
+				console.closeWindow(null);
 			cleanup();
 			close();
 		}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/6ce4b837/installer/src/org/apache/flex/packageflexsdk/view/components/ConsoleWindow.mxml
----------------------------------------------------------------------
diff --git a/installer/src/org/apache/flex/packageflexsdk/view/components/ConsoleWindow.mxml
b/installer/src/org/apache/flex/packageflexsdk/view/components/ConsoleWindow.mxml
index a3a1162..d992d41 100644
--- a/installer/src/org/apache/flex/packageflexsdk/view/components/ConsoleWindow.mxml
+++ b/installer/src/org/apache/flex/packageflexsdk/view/components/ConsoleWindow.mxml
@@ -34,7 +34,7 @@ limitations under the License.
         [Bindable]
         public var messages:ArrayCollection = new ArrayCollection();
 
-        protected function closeWindow(event:MouseEvent):void {
+        public function closeWindow(event:MouseEvent):void {
             close();
         }
 


Mime
View raw message