I'm trying to open a text file, and read it's contents with a JS based AIR app. My code: var loginFileName = 'app.login'; var loginFile = air.File.applicationStorageDirectory.resolvePath(loginFileName); var _fs = new air.FileStream(); _fs.open(loginFile, air.FileMode.READ); var o = _fs.readObject();
As soon as it hits the readObject line it bombs with the following error: RangeError: Error #2006: The supplied index is out of bounds. at app:/scripts/Login.js : 33 I know that the file is there, and that it's open for read because I can swap out that line for this: var o = _fs.readUTFBytes(_fs.bytesAvailable); and it works just fine. Anyone have any ideas what's happening? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:5103 Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37
