Ensure that the default flex sdk setting is honored
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/a2362f78 Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/a2362f78 Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/a2362f78 Branch: refs/heads/master Commit: a2362f78f110334d429fae131a9ccbdf03a4228b Parents: 345bb22 Author: Om <bigosma...@gmail.com> Authored: Fri Jul 19 17:14:05 2013 -0700 Committer: Om <bigosma...@gmail.com> Committed: Fri Jul 19 17:14:37 2013 -0700 ---------------------------------------------------------------------- installer/src/InstallApacheFlex.mxml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a2362f78/installer/src/InstallApacheFlex.mxml ---------------------------------------------------------------------- diff --git a/installer/src/InstallApacheFlex.mxml b/installer/src/InstallApacheFlex.mxml index 286bfbe..90b87f4 100644 --- a/installer/src/InstallApacheFlex.mxml +++ b/installer/src/InstallApacheFlex.mxml @@ -437,7 +437,7 @@ variables are not required because the locations of these pieces are known. var selectedFlexVersion:String = files.(@name == 'FlexVersions').@default.toString(); if (this.flexVersion.selectedIndex == -1) { - this.flexVersion.selectedIndex = 0; + this.flexVersion.selectedIndex = getIndexOfFlexVersion(selectedFlexVersion); } var selectedFlexVersionObject:Object = this.flexVersion.selectedItem; @@ -537,6 +537,19 @@ variables are not required because the locations of these pieces are known. } } + protected function getIndexOfFlexVersion(ver:String):int + { + for (var i:int=0; i<FLEX_VERSIONS.length; i++) + { + var obj:Object = FLEX_VERSIONS.getItemAt(i); + if(obj.label == "Flex SDK " + ver) + { + return i; + } + } + return -1; + } + protected function setOSSpecificVariables():void { var operatingSystemStr:String = Capabilities.os; @@ -754,6 +767,7 @@ variables are not required because the locations of these pieces are known. /*APACHE_FLEX_BIN_DISTRO_VERSION = flexVersion.selectedItem.version; APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY = flexVersion.selectedItem.label;*/ updateFlexVersionStrings(flexVersion.selectedItem); + getMirrorURLResultHandler(); updateWindowTitle(); }