FLEX-34854 Changes to asdocs comments to get the spark and mx versions of Sort.as more similar.
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/697ce528 Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/697ce528 Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/697ce528 Branch: refs/heads/develop Commit: 697ce5288d09210b8adb8cf979e4bf21f92630a7 Parents: 71f8757 Author: Mihai Chira <[email protected]> Authored: Sun Jun 21 20:27:52 2015 +0100 Committer: Mihai Chira <[email protected]> Committed: Sun Jun 21 20:27:52 2015 +0100 ---------------------------------------------------------------------- .../framework/src/mx/collections/Sort.as | 20 ++++++++++++-------- .../spark/src/spark/collections/Sort.as | 10 +++++----- 2 files changed, 17 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/697ce528/frameworks/projects/framework/src/mx/collections/Sort.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/framework/src/mx/collections/Sort.as b/frameworks/projects/framework/src/mx/collections/Sort.as index 162dad0..b296ed3 100644 --- a/frameworks/projects/framework/src/mx/collections/Sort.as +++ b/frameworks/projects/framework/src/mx/collections/Sort.as @@ -34,26 +34,29 @@ package mx.collections /** * Provides the sorting information required to establish a sort on an - * existing view (ICollectionView interface or class that implements the - * interface). After you assign a Sort instance to the view's + * existing view (<code>ICollectionView</code> interface or class that + * implements the interface). After you assign a <code>Sort</code> instance to the view's * <code>sort</code> property, you must call the view's * <code>refresh()</code> method to apply the sort criteria. * - * Typically the sort is defined for collections of complex items, that is + * <p>Typically the sort is defined for collections of complex items, that is * collections in which the sort is performed on one or more properties of * the objects in the collection. - * The following example shows this use: + * The following example shows this use:</p> * <pre><code> * var col:ICollectionView = new ArrayCollection(); * // In the real world, the collection would have more than one item. * col.addItem({first:"Anders", last:"Dickerson"}); + * * // Create the Sort instance. - * var sort:Sort = new Sort(); + * var sort:ISort = new Sort(); + * * // Set the sort field; sort on the last name first, first name second. * // Both fields are case-insensitive. * sort.fields = [new SortField("last",true), new SortField("first",true)]; * // Assign the Sort object to the view. * col.sort = sort; + * * // Apply the sort to the collection. * col.refresh(); * </code></pre> @@ -70,7 +73,8 @@ package mx.collections * col.addItem("California"); * col.addItem("Arizona"); * var sort:Sort = new Sort(); - * // There is only one sort field, so use a <code>null</code> + * + * // There is only one sort field, so use a <code>null</code> * // first parameter. * sort.fields = [new SortField(null, true)]; * col.sort = sort; @@ -78,8 +82,8 @@ package mx.collections * </code></pre> * </p> * - * <p>The Flex implementations of the ICollectionView interface retrieve - * all items from a remote location before executing a sort. + * <p>The Flex implementations of the <code>ICollectionView</code> interface + * retrieve all items from a remote location before executing a sort. * If you use paging with a sorted list, apply the sort to the remote * collection before you retrieve the data. * </p> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/697ce528/frameworks/projects/spark/src/spark/collections/Sort.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/spark/src/spark/collections/Sort.as b/frameworks/projects/spark/src/spark/collections/Sort.as index a01ebf6..3a34be2 100644 --- a/frameworks/projects/spark/src/spark/collections/Sort.as +++ b/frameworks/projects/spark/src/spark/collections/Sort.as @@ -130,8 +130,8 @@ package spark.collections * </p> * * <p>The default comparison provided by the <code>SortField</code> class - * provides correct language specific - * sorting for strings. The language is selected by the setting the locale + * provides correct language-specific + * sorting for strings. The language is selected by setting the locale * style on an instance of the class in one of the following ways: * </p> * <ul> @@ -178,9 +178,9 @@ package spark.collections * /> * </pre> * - * <p>In case items have inconsistent data types or items have complex data types, use of default - * built-in compare functions is not desired. Inconsistent sort result may occur in such cases. - * To avoid such problem, provide custom compare function and/or make item types consistent.</p> + * <p>In case items have inconsistent data types or items have complex data types, the use of the default + * built-in compare functions is not recommended. Inconsistent sorting results may occur in such cases. + * To avoid such problem, provide a custom compare function and/or make the item types consistent.</p> * * @includeExample examples/SortExample1.mxml * @includeExample examples/SortExample2.mxml
