You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2014/10/25 06:56:49 UTC

git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605 cleanup

Repository: flex-utilities
Updated Branches:
  refs/heads/develop 75e929adb -> fd1a85f06


FLEX-34605 cleanup


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

Branch: refs/heads/develop
Commit: fd1a85f06ce6be0b5780b01fdc0cefb9e8964e5c
Parents: 75e929a
Author: Justin Mclean <jm...@apache.org>
Authored: Sat Oct 25 15:56:21 2014 +1100
Committer: Justin Mclean <jm...@apache.org>
Committed: Sat Oct 25 15:56:21 2014 +1100

----------------------------------------------------------------------
 installer/src/InstallApacheFlex.mxml            | 20 ++++++++++----------
 .../resource/ViewResourceConstants.as           |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd1a85f0/installer/src/InstallApacheFlex.mxml
----------------------------------------------------------------------
diff --git a/installer/src/InstallApacheFlex.mxml b/installer/src/InstallApacheFlex.mxml
index dc12d2b..010f0ca 100644
--- a/installer/src/InstallApacheFlex.mxml
+++ b/installer/src/InstallApacheFlex.mxml
@@ -51,7 +51,7 @@ variables are not required because the locations of these pieces are known.
         <fx:Component className="CacheDialog" >
             <s:TitleWindow title="Download Cache Configuration" width="400" height="130" 
                            backgroundColor="0xDDDDDD" close="closeUp()">
-                 <fx:Script>
+                <fx:Script>
                     <![CDATA[
                         import mx.managers.PopUpManager;
                         
@@ -98,7 +98,7 @@ variables are not required because the locations of these pieces are known.
             </s:TitleWindow>
         </fx:Component>
     </fx:Declarations>
-     <fx:Script><![CDATA[
+    <fx:Script><![CDATA[
         import flash.globalization.LocaleID;
         import flash.globalization.StringTools;
         
@@ -117,7 +117,7 @@ variables are not required because the locations of these pieces are known.
         import spark.events.IndexChangeEvent;
         import spark.events.TextOperationEvent;
         
-        import AntClasses; AntClasses;
+        import AntClasses;
         import org.apache.flex.ant.Ant;
         import org.apache.flex.ant.tags.Checksum;
         import org.apache.flex.ant.tags.Copy;
@@ -1106,7 +1106,7 @@ variables are not required because the locations of these pieces are known.
         
         protected function handleInstallBtnClick(event:MouseEvent):void
         {
-			 var airVersionID:String = airVersion.selectedItem.versionID;
+            var airVersionID:String = airVersion.selectedItem.versionID;
             var flashVersionID:String = flashPlayerVersion.selectedItem.versionID;
             
             log("SDK version " + APACHE_FLEX_BIN_DISTRO_VERSION_DISPLAY);
@@ -1126,7 +1126,7 @@ variables are not required because the locations of these pieces are known.
                 else
                     log("Flash Player version " + FLASH_PLAYER_VERSION);
             }
-
+            
             if (flexSDKTxtInput.text == "") {
                 log(_viewResourceConstants.INFO_ENTER_VALID_FLEX_SDK_PATH);
             } else {
@@ -1149,7 +1149,7 @@ variables are not required because the locations of these pieces are known.
             var flashVersionID:String = flashPlayerVersion.selectedItem.versionID;
             
             setXMLVariables(); // as AIR and Flash version may of changed
-            
+           
             if (!legacy)
             {
                 var req:URLRequest = new URLRequest(APACHE_FLEX_BIN_INSTALLER_URL);
@@ -1166,7 +1166,7 @@ variables are not required because the locations of these pieces are known.
             }
         }
         
-		protected function handleFirstStepBackBtnClick(event:MouseEvent):void
+        protected function handleFirstStepBackBtnClick(event:MouseEvent):void
         {
             showDefaultState();
         }
@@ -1175,8 +1175,8 @@ variables are not required because the locations of these pieces are known.
         {
             showDirectoryState();
         }
-		 
-		protected function handleFirstStepNextBtnClick(event:MouseEvent):void
+        
+        protected function handleFirstStepNextBtnClick(event:MouseEvent):void
         {
             // Quick check to see if the selected directory is writable
             try {
@@ -1276,7 +1276,7 @@ variables are not required because the locations of these pieces are known.
             initiateInstallStepsActivity();
             if (currentState != "optionsState")
             {
-            initializeInstallerComponentsDataProvider();
+                initializeInstallerComponentsDataProvider();
             }
             currentState = "directoryState";
         }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd1a85f0/installer/src/org/apache/flex/packageflexsdk/resource/ViewResourceConstants.as
----------------------------------------------------------------------
diff --git a/installer/src/org/apache/flex/packageflexsdk/resource/ViewResourceConstants.as b/installer/src/org/apache/flex/packageflexsdk/resource/ViewResourceConstants.as
index 1455c1f..8743ac1 100644
--- a/installer/src/org/apache/flex/packageflexsdk/resource/ViewResourceConstants.as
+++ b/installer/src/org/apache/flex/packageflexsdk/resource/ViewResourceConstants.as
@@ -89,7 +89,7 @@ public dynamic class ViewResourceConstants extends Proxy implements IEventDispat
 	
 	private var _eventDispatcher:EventDispatcher;
 	
-	private var _resourceManager:IResourceManager = ResourceManager.getInstance();;
+	private var _resourceManager:IResourceManager = ResourceManager.getInstance();
 	
 	//--------------------------------------------------------------------------
 	//


RE: git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605 cleanup

Posted by Neil Madsen <li...@cranialinteractive.com>.
Yes, it definitely makes sense now.
Just something I've never done. I didn't realize that by just having it like
that the compiler would pull it in. 
I always thought you had to assign it to a var or something to invoke the
compiler to pull in those files.

Learn something new every day. ;) Thanks for that.

Neil

-----Original Message-----
From: Alex Harui [mailto:aharui@adobe.com] 
Sent: October-25-14 11:17 PM
To: dev@flex.apache.org; Neil Madsen
Subject: Re: git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605
cleanup



On 10/25/14, 5:47 AM, "Neil Madsen" <li...@cranialinteractive.com> wrote:

>Same error here.
>
>Alex, could you add a comment to the file explaining the reason for the 
>double "AntClasses"

OK, added a short comment.

>I've never seen it done that way before but after reading your 
>explanation it does makes sense.

As you rummage through the SDK code, you'll see this pattern in other
places.  I think just about every SWC uses this pattern to force-link
classes into the SWC that are not listed in the MXML manifest but are likely
to be used from AS.  For example [1].

It's a shorthand version of the pattern documented here [2] and saves
defining a variable in the class definition.  But it is a bit subtle so I
should have added a comment back when.

Under the hood, the MXML compiler only links in classes it finds during the
compiling of a class.  The Installer's Ant_on_AIR library currently does not
have code that causes the linking in of every ant task handler because I
wanted to make it easy for folks who might use Ant_on_AIR in other scenarios
to only have to bake in the ant tasks they need for a specific purpose.  We
can change that if we want, of course.  So that means the Installer, which
doesn't reference the tasks directly since really only the Ant script it is
executing that needs the task, needs some way to get all of those tasks
linked in.  You don't actually have to assign variables with types to link
in a class, just mentioning the class in the package is good enough.

-Alex

[1]
https://git-wip-us.apache.org/repos/asf/flex-sdk/repo?p=flex-sdk.git;a=blob
_plain;f=frameworks/projects/framework/src/FrameworkClasses.as;hb=develop

[2]
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084
-799a.html



RE: git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605 cleanup

Posted by Frédéric THOMAS <we...@hotmail.com>.
As another way, what I generally do in my own code and I agree it is more verbose but more self explanatory, I use an array of those classes as a private static constant called forcedDependencies, doing so, users not knowing the trick can guess it.

Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org; lists@cranialinteractive.com
> Subject: Re: git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605 cleanup
> Date: Sun, 26 Oct 2014 05:17:08 +0000
> 
> 
> 
> On 10/25/14, 5:47 AM, "Neil Madsen" <li...@cranialinteractive.com> wrote:
> 
> >Same error here.
> >
> >Alex, could you add a comment to the file explaining the reason for the
> >double "AntClasses"
> 
> OK, added a short comment.
> 
> >I've never seen it done that way before but after reading your explanation
> >it does makes sense.
> 
> As you rummage through the SDK code, you’ll see this pattern in other
> places.  I think just about every SWC uses this pattern to force-link
> classes into the SWC that are not listed in the MXML manifest but are
> likely to be used from AS.  For example [1].
> 
> It’s a shorthand version of the pattern documented here [2] and saves
> defining a variable in the class definition.  But it is a bit subtle so I
> should have added a comment back when.
> 
> Under the hood, the MXML compiler only links in classes it finds during
> the compiling of a class.  The Installer’s Ant_on_AIR library currently
> does not have code that causes the linking in of every ant task handler
> because I wanted to make it easy for folks who might use Ant_on_AIR in
> other scenarios to only have to bake in the ant tasks they need for a
> specific purpose.  We can change that if we want, of course.  So that
> means the Installer, which doesn’t reference the tasks directly since
> really only the Ant script it is executing that needs the task, needs some
> way to get all of those tasks linked in.  You don’t actually have to
> assign variables with types to link in a class, just mentioning the class
> in the package is good enough.
> 
> -Alex
> 
> [1] 
> https://git-wip-us.apache.org/repos/asf/flex-sdk/repo?p=flex-sdk.git;a=blob
> _plain;f=frameworks/projects/framework/src/FrameworkClasses.as;hb=develop
> 
> [2] 
> http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084
> -799a.html
> 
 		 	   		  

Re: git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605 cleanup

Posted by Alex Harui <ah...@adobe.com>.

On 10/25/14, 5:47 AM, "Neil Madsen" <li...@cranialinteractive.com> wrote:

>Same error here.
>
>Alex, could you add a comment to the file explaining the reason for the
>double "AntClasses"

OK, added a short comment.

>I've never seen it done that way before but after reading your explanation
>it does makes sense.

As you rummage through the SDK code, you’ll see this pattern in other
places.  I think just about every SWC uses this pattern to force-link
classes into the SWC that are not listed in the MXML manifest but are
likely to be used from AS.  For example [1].

It’s a shorthand version of the pattern documented here [2] and saves
defining a variable in the class definition.  But it is a bit subtle so I
should have added a comment back when.

Under the hood, the MXML compiler only links in classes it finds during
the compiling of a class.  The Installer’s Ant_on_AIR library currently
does not have code that causes the linking in of every ant task handler
because I wanted to make it easy for folks who might use Ant_on_AIR in
other scenarios to only have to bake in the ant tasks they need for a
specific purpose.  We can change that if we want, of course.  So that
means the Installer, which doesn’t reference the tasks directly since
really only the Ant script it is executing that needs the task, needs some
way to get all of those tasks linked in.  You don’t actually have to
assign variables with types to link in a class, just mentioning the class
in the package is good enough.

-Alex

[1] 
https://git-wip-us.apache.org/repos/asf/flex-sdk/repo?p=flex-sdk.git;a=blob
_plain;f=frameworks/projects/framework/src/FrameworkClasses.as;hb=develop

[2] 
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084
-799a.html


RE: git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605 cleanup

Posted by Neil Madsen <li...@cranialinteractive.com>.
Same error here.

Alex, could you add a comment to the file explaining the reason for the
double "AntClasses"
I've never seen it done that way before but after reading your explanation
it does makes sense. 
I think having a note there is definitely helpful just in case someone sees
it later on.
 
Neil

-----Original Message-----
From: Justin Mclean [mailto:justin@classsoftware.com] 
Sent: October-25-14 3:05 AM
To: dev@flex.apache.org
Subject: Re: git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605
cleanup

Hi,

>> -        import AntClasses; AntClasses;
>> +        import AntClasses;

> This one worries me.

>  I think you have to try 4.13 or FlexJS as all older SDKs are not using
ant_on_air right now.

Yep you're right 4.13 fails to install with this error:

nullError: no processor for property
	at org.apache.flex.xml::XMLTagProcessor/processXMLTag()
	at org.apache.flex.xml::XMLTagProcessor/processChildren()
	at org.apache.flex.ant.tags.supportClasses::TaskHandler/execute()
	at org.apache.flex.ant.tags::Project/execute()
	at org.apache.flex.ant::Ant/processXMLFile()
	at InstallApacheFlex/runInstallerScript()
	at InstallApacheFlex/handleApacheFlexSDKZipFileUnzipComplete()

no processor for property

Posted just in case anyone else runs into it. Will revert.

Justin



Re: git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605 cleanup

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

>> -        import AntClasses; AntClasses;
>> +        import AntClasses;

> This one worries me.

>  I think you have to try 4.13 or FlexJS as all older SDKs are not using ant_on_air right now.

Yep you're right 4.13 fails to install with this error:

nullError: no processor for property
	at org.apache.flex.xml::XMLTagProcessor/processXMLTag()
	at org.apache.flex.xml::XMLTagProcessor/processChildren()
	at org.apache.flex.ant.tags.supportClasses::TaskHandler/execute()
	at org.apache.flex.ant.tags::Project/execute()
	at org.apache.flex.ant::Ant/processXMLFile()
	at InstallApacheFlex/runInstallerScript()
	at InstallApacheFlex/handleApacheFlexSDKZipFileUnzipComplete()

no processor for property

Posted just in case anyone else runs into it. Will revert.

Justin


Re: git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605 cleanup

Posted by Alex Harui <ah...@adobe.com>.

On 10/24/14, 9:56 PM, "jmclean@apache.org" <jm...@apache.org> wrote:

>-        import AntClasses; AntClasses;
>+        import AntClasses;
This one worries me.  I should have left a comment on it, but the second
“AntClasses” force-links all of the ant task handlers into the app.  I’m
not sure I’ve listed them any other way that would link them in.  Did an
ant_on_air install actually work after this change?  I think you have to
try 4.13 or FlexJS as all older SDKs are not using ant_on_air right now.

-Alex 


Re: git commit: [flex-utilities] [refs/heads/develop] - FLEX-34605 cleanup

Posted by Alex Harui <ah...@adobe.com>.

On 10/24/14, 9:56 PM, "jmclean@apache.org" <jm...@apache.org> wrote:

>-        import AntClasses; AntClasses;
>+        import AntClasses;
This one worries me.  I should have left a comment on it, but the second
“AntClasses” force-links all of the ant task handlers into the app.  I’m
not sure I’ve listed them any other way that would link them in.  Did an
ant_on_air install actually work after this change?  I think you have to
try 4.13 or FlexJS as all older SDKs are not using ant_on_air right now.

-Alex