Created
July 10, 2011 01:07
-
-
Save s9tpepper/1074117 to your computer and use it in GitHub Desktop.
Using the Cursor object toArray() method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Alternatively, once the Cursor is returned to the callback the Cursor's | |
toArray() method can be used to retrieve an Array of all the documents that | |
the Cursor object has loaded. */ | |
function onCursorReady(cursor:Cursor):void | |
{ | |
// Get array of all documents | |
var documents:Array = cursor.toArray(); | |
// Do something, such as add it to a data provider | |
myDP = new ArrayCollection(documents); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment