You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2019/01/03 20:17:46 UTC

[royale-asjs] branch develop updated (92f1f7f -> 20b3201)

This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.


    from 92f1f7f  fix popup example, although binding is not working as expected
     new 94a06bd  minor:code tidy
     new 20b3201  Fix a binding bug with multiple event triggers

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../TourDeJewel/src/main/royale/PopUpPlayGround.mxml    | 17 ++++++++---------
 .../org/apache/royale/binding/ContainerDataBinding.as   | 11 ++++++-----
 .../org/apache/royale/collections/CollectionUtils.as    | 13 ++++++-------
 3 files changed, 20 insertions(+), 21 deletions(-)


[royale-asjs] 01/02: minor:code tidy

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 94a06bd2befc5b59944c17f7ec285ed20bd4e498
Author: greg-dove <gr...@gmail.com>
AuthorDate: Fri Jan 4 09:16:37 2019 +1300

    minor:code tidy
---
 .../royale/org/apache/royale/collections/CollectionUtils.as | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/CollectionUtils.as b/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/CollectionUtils.as
index 4279e7c..024a6e8 100644
--- a/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/CollectionUtils.as
+++ b/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/CollectionUtils.as
@@ -18,13 +18,12 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.collections
 {
-	import org.apache.royale.collections.CollectionUtils;
 
 	public class CollectionUtils
 	{
         /**
          *  Constructor.
-         *  
+         *
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
@@ -43,7 +42,7 @@ package org.apache.royale.collections
 		 * @param value Any kind of object to perform the comparison
 		 *
 		 * @return an <code>int</code> that represents the index of the object in the collection
-		 * 
+		 *
 		 * @langversion 3.0
          * @playerversion Flash 10.2
          * @playerversion AIR 2.6
@@ -78,7 +77,7 @@ package org.apache.royale.collections
 		 * @param value Any kind of object to perform the comparison
 		 *
 		 * @return The object if exists in the collection
-		 * 
+		 *
 		 * @langversion 3.0
          * @playerversion Flash 10.2
          * @playerversion AIR 2.6
@@ -107,13 +106,13 @@ package org.apache.royale.collections
 		 * The comparation is based on 'id'
 		 * Supports nulls in property object and returns -1
 		 * For use with List components in bindinds with "selectedIndex"
-		 * 
+		 *
 		 * @param collection a <code>ICollectionView</code> dataprovider where we need to look for
 		 * @param obj an <code>Object</code> with a subproperty used for comparation
 		 * @param property the <code>String</code> name of the subproperty. This could be and Obejct with an id or directly a propertyId
 		 *
 		 * @return the index if was found, -1 if the object is null or not found
-		 * 
+		 *
 		 * @langversion 3.0
          * @playerversion Flash 10.2
          * @playerversion AIR 2.6
@@ -137,4 +136,4 @@ package org.apache.royale.collections
 			return index;
 		}
     }
-}
\ No newline at end of file
+}


[royale-asjs] 02/02: Fix a binding bug with multiple event triggers

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 20b32016b723a6f71e22454040e37ae9996d3814
Author: greg-dove <gr...@gmail.com>
AuthorDate: Fri Jan 4 09:17:20 2019 +1300

    Fix a binding bug with multiple event triggers
---
 .../TourDeJewel/src/main/royale/PopUpPlayGround.mxml    | 17 ++++++++---------
 .../org/apache/royale/binding/ContainerDataBinding.as   | 11 ++++++-----
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/examples/royale/TourDeJewel/src/main/royale/PopUpPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/PopUpPlayGround.mxml
index 2567d39..0c33d8a 100644
--- a/examples/royale/TourDeJewel/src/main/royale/PopUpPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/PopUpPlayGround.mxml
@@ -17,10 +17,10 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<c:ExampleAndSourceCodeTabbedSectionContent xmlns:fx="http://ns.adobe.com/mxml/2009" 
-	xmlns:j="library://ns.apache.org/royale/jewel" 
-	xmlns:html="library://ns.apache.org/royale/html" 
-	xmlns:js="library://ns.apache.org/royale/basic" 
+<c:ExampleAndSourceCodeTabbedSectionContent xmlns:fx="http://ns.adobe.com/mxml/2009"
+	xmlns:j="library://ns.apache.org/royale/jewel"
+	xmlns:html="library://ns.apache.org/royale/html"
+	xmlns:js="library://ns.apache.org/royale/basic"
 	xmlns:c="components.*" sourceCodeUrl="PopUpPlayGround.mxml">
 
 	<fx:Script>
@@ -34,7 +34,6 @@ limitations under the License.
 		public function closePopUpHandler(event:Event):void
 		{
 			trace("[closePopUp] ", event.target, popup1.content);
-			check1.selected = false;
 		}
 		]]>
 	</fx:Script>
@@ -50,10 +49,10 @@ limitations under the License.
 
 				<!-- PopUp 1-->
 				<j:Label text="Click the button below to display a Modal PopUp"/>
-				<j:CheckBox localId="check1" text="open/close the popup: {popup1.open}" selected="{popup1.open}"/>
-				<j:PopUp id="popup1" className="somePopUpContent" modal="true" 
-							open="{check1.selected}" 
-							openPopUp="openPopUpHandler(event)" 
+				<j:CheckBox localId="check1" selected="{popup1.open}" text="open/close the popup: {popup1.open}" />
+				<j:PopUp id="popup1" className="somePopUpContent" modal="true"
+							open="{check1.selected}"
+							openPopUp="openPopUpHandler(event)"
 							closePopUp="closePopUpHandler(event)" />
 			</j:Card>
 		</j:GridCell>
diff --git a/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/ContainerDataBinding.as b/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/ContainerDataBinding.as
index e1e3c33..edc2600 100644
--- a/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/ContainerDataBinding.as
+++ b/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/ContainerDataBinding.as
@@ -39,7 +39,7 @@ package org.apache.royale.binding
      *  the different lifecycles.  For example, an item renderer
      *  databinding implementation can wait to execute databindings
      *  until the data property is set.
-     *  
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.2
      *  @playerversion AIR 2.6
@@ -49,7 +49,7 @@ package org.apache.royale.binding
 	{
         /**
          *  Constructor.
-         *  
+         *
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
@@ -126,6 +126,8 @@ package org.apache.royale.binding
                                 cb.setDocument(_strand);
 
                                 prepareCreatedBinding(cb as IBinding, binding);
+                            } else {
+                                makeGenericBinding(binding, i, watchers);
                             }
                         }
                         else
@@ -176,8 +178,7 @@ package org.apache.royale.binding
                         prepareCreatedBinding(sb as IBinding, binding);
                     }
                 }
-                else
-                {
+                else  {
                     makeGenericBinding(binding, i, watchers);
                 }
 
@@ -201,7 +202,7 @@ package org.apache.royale.binding
                 // should be a constant expression.
                 // the value doesn't matter as GenericBinding
                 // should get the value from the source
-                gb.valueChanged(null);  
+                gb.valueChanged(null);
             }
         }
     }