You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/06/11 07:18:32 UTC

git commit: [flex-utilities] [refs/heads/develop] - close console window if it is open when app closes

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 <ah...@apache.org>
Authored: Tue Jun 10 22:17:44 2014 -0700
Committer: Alex Harui <ah...@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();
         }