You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/12/09 06:17:17 UTC

[30/31] git commit: [flex-asjs] [refs/heads/develop] - add length property

add length property


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

Branch: refs/heads/develop
Commit: 22d812b6a716c704b1427b01a057115ccf0c2d0d
Parents: 6cd888b
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 20:43:36 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 21:09:29 2014 -0800

----------------------------------------------------------------------
 .../org/apache/flex/net/dataConverters/LazyCollection.js  | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/22d812b6/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js b/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
index 7c42ca0..a277e1c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
@@ -172,3 +172,13 @@ org.apache.flex.net.dataConverters.LazyCollection.prototype.getItemAt =
 
   return this.data_[index];
 };
+
+
+/**
+ * @expose
+ * @return {string} The number of items in the collection.
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.get_length =
+    function() {
+  return this.rawData ? this.rawData.length : 0;
+};