Adobe Integrated Runtime (AIR) for JavaScript Developers Pocket Reference
File API | 79 </head> <body onload="doLoad( )"> <textarea id="txtNote"></textarea> <input id="btnSave ...
80 | Chapter 4: AIR Mini-Cookbook The steps for synchronously reading a file are almost always the same: 1.Get aFile reference 2 ...
File API | 81 If this is the target format of the data for the application, then these methods should be used directly. In the c ...
82 | Chapter 4: AIR Mini-Cookbook function doLoad( ) { var data = null; file = air.File.applicationStorageDirectory.resolve( "my ...
File API | 83 that event listeners must be created and registered on the FileStream object. The steps for asynchronously reading ...
84 | Chapter 4: AIR Mini-Cookbook // Append the most recent content document.getElementById( "editor" ).value += data; // Close ...
File API | 85 This example provides a baseline for the various types of asynchronous access an application might choose to per- ...
86 | Chapter 4: AIR Mini-Cookbook </head> <body onload="doLoad( )"> <textarea id="editor"></textarea> &l ...
File API | 87 applications can also work offline, the endpoint needs to be pointed to a local resource. Rather than pass an endp ...
88 | Chapter 4: AIR Mini-Cookbook <script> var file = null; var xml = null; function doLoad( ) { file = air.File.applicati ...
File API | 89 Creating a Temporary File Problem An application needs to store transient information during file processing, and ...
90 | Chapter 4: AIR Mini-Cookbook argument is set to false, and a collision occurs, the applica- tion throws an error: var move ...
File API | 91 catch( ioe ) { alert( "Could not move temporary file:\n" + ioe.message ); } } </script> </head> <bo ...
92 | Chapter 4: AIR Mini-Cookbook property will contain a reference to theFileobject the invoked the browse operation: var direc ...
File API | 93 var directory = null; function doBrowse( ) { directory.browseForDirectory( "Select a directory of files:" ) } fun ...
94 | Chapter 4: AIR Mini-Cookbook </head> <body onload="doLoad( )"> <input id="btnBrowse" type="button" value="Br ...
File Pickers | 95 TIP If you want to use theFileFilterobject, you must use the Array class from the Flash runtime, not the JavaS ...
96 | Chapter 4: AIR Mini-Cookbook the user. For this purpose, it may be beneficial to have a class or global reference to theFil ...
File Pickers | 97 Browse for Multiple Files Problem An application needs to prompt the user to select multiple files from the lo ...
98 | Chapter 4: AIR Mini-Cookbook Here is the complete code: <html> <head> <title>Browse for Multiple Files< ...
«
1
2
3
4
5
6
7
8
9
»
Free download pdf