House of Fusion
Home of the ColdFusion Community
Hostmysite VPS Hosting

Search adobe-integrated-runtime

July 20, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition

For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  Adobe Integrated Runtime (AIR)

FileStream readObject with JS based AIR app

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andy Matthews
03/17/2008 12:34 AM

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?


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists