Repository: flex-sdk
Updated Branches:
  refs/heads/develop a9823014c -> 4ed0ee64c


FLEX-34837
Using the newly introduced ComplexSortField. Also made the VOs bindable rather 
than each of their properties.


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

Branch: refs/heads/develop
Commit: 2937a783df6935f6ce9093106d72e2212a698439
Parents: a982301
Author: Mihai Chira <[email protected]>
Authored: Mon Jun 8 12:42:38 2015 +0200
Committer: Mihai Chira <[email protected]>
Committed: Mon Jun 8 12:42:38 2015 +0200

----------------------------------------------------------------------
 .../tests/ListCollectionView_FLEX_34837_Tests.as | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2937a783/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as 
b/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
index ae8f746..33d0336 100644
--- a/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
+++ b/frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
@@ -19,6 +19,7 @@
 
 package {
     import mx.collections.ArrayList;
+    import mx.collections.ComplexSortField;
     import mx.collections.IList;
     import mx.collections.ListCollectionView;
     import mx.collections.Sort;
@@ -43,7 +44,7 @@ package {
         }
 
         [Test]
-        public function 
test_simple_sort_by_complex_fields_with_custom_compare_function_for_sort():void
+        public function 
test_sort_by_complex_fields_with_custom_compare_function_for_sort():void
         {
             function compareByStreet(a:ListCollectionView_FLEX_34837_VO, 
b:ListCollectionView_FLEX_34837_VO, fields:Array):int
             {
@@ -58,7 +59,7 @@ package {
             _sut.addAll(from4To0); //values["address.street"]: Street4, 
Street3, Street2, Street1, Street0
 
             const sortByStreetAscending:Sort = new Sort();
-            sortByStreetAscending.fields = [new SortField("address.street", 
false, false, false)]; //should make no difference
+            sortByStreetAscending.fields = [new 
ComplexSortField("address.street", false, false, false)]; //should make no 
difference
             sortByStreetAscending.compareFunction = compareByStreet;
             _sut.sort = sortByStreetAscending;
 
@@ -70,7 +71,7 @@ package {
         }
 
         [Test]
-        public function 
test_simple_sort_by_complex_fields_with_custom_compare_function_for_sort_field():void
+        public function 
test_sort_by_complex_fields_with_custom_compare_function_for_sort_field():void
         {
             function compareByStreet(a:ListCollectionView_FLEX_34837_VO, 
b:ListCollectionView_FLEX_34837_VO):int
             {
@@ -85,7 +86,7 @@ package {
             _sut.addAll(from4To0); //values["address.street"]: Street4, 
Street3, Street2, Street1, Street0
 
             const sortByStreetAscending:Sort = new Sort();
-            var sortField:SortField = new SortField("address.street", false, 
false, false);
+            var sortField:SortField = new ComplexSortField("address.street", 
false, false, false);
             sortField.compareFunction = compareByStreet;
             sortByStreetAscending.fields = [sortField];
             _sut.sort = sortByStreetAscending;
@@ -129,7 +130,7 @@ package {
             _sut.addAll(from1To4);
 
             const sortByNameAscending:Sort = new Sort();
-            sortByNameAscending.fields = [new SortField("address.street", 
false, false, false)];
+            sortByNameAscending.fields = [new 
ComplexSortField("address.street", false, false, false)];
             _sut.sort = sortByNameAscending;
             _sut.refresh(); //values: Object1, Object2, Object3, Object4
 
@@ -181,15 +182,11 @@ package {
     }
 }
 
+[Bindable]
 class ListCollectionView_FLEX_34837_VO
 {
-    [Bindable]
     public var name:String;
-
-    [Bindable]
     public var address:ListCollectionView_FLEX_34837_AddressVO;
-
-    [Bindable]
     public var index:Number;
 
     public function ListCollectionView_FLEX_34837_VO(index:Number, 
namePrefix:String, streetPrefix:String)
@@ -200,9 +197,9 @@ class ListCollectionView_FLEX_34837_VO
     }
 }
 
+[Bindable]
 class ListCollectionView_FLEX_34837_AddressVO
 {
-    [Bindable]
     public var street:String;
 
     public function ListCollectionView_FLEX_34837_AddressVO(street:String)

Reply via email to