Adobe Integrated Runtime (AIR) for JavaScript Developers Pocket Reference
Embedded Database | 119 function doLoad() { var file = air.File.applicationResourceDirectory.resolve( "crm.db" ); db =new air.SQ ...
120 | Chapter 4: AIR Mini-Cookbook Discussion Given a valid database file with the appropriate schema cre- ated, SQL92 statement ...
Embedded Database | 121 stmt.text = "INSERT INTO contact VALUES ( " + "NULL, " + "’" + first + "’, " + "’" + last + "’ )"; // Tr ...
122 | Chapter 4: AIR Mini-Cookbook "id INTEGER PRIMARY KEY AUTOINCREMENT, " + "first TEXT, " + "last TEXT )"; state = CREATE_SCH ...
Embedded Database | 123 case INSERT_DATA: document.getElementById( "txtFirst" ).value = ""; document.getElementById( "txtLast" ) ...
124 | Chapter 4: AIR Mini-Cookbook Solution Database data can be queried using SQL92 and the SQLStatement class. Discussion Trad ...
Embedded Database | 125 Array will contain Object instances whose properties match the names of the columns used in the query. T ...
126 | Chapter 4: AIR Mini-Cookbook var file = air.File.applicationResourceDirectory.resolve( "crm.db" ); db =new air.SQLConnecti ...
Command-Line Arguments | 127 function doStmtError( event ) { alert( "There has been a problem executing a statement:\n" + event. ...
128 | Chapter 4: AIR Mini-Cookbook You should register for theInvokeEventduring your applica- tion’s initialization phase, in or ...
Networking | 129 var field = document.getElementById("outputField"); field.value += "Invoke : " + event.arguments + "\n"; } func ...
130 | Chapter 4: AIR Mini-Cookbook you send data to a persistent socket endpoint and receive data from it in real time. You do n ...
Networking | 131 // endpoint. socket.writeUTFBytes( "Bob" ); // Send the actual bytes to the server and clear // the stream. We ...
132 | Chapter 4: AIR Mini-Cookbook // Now we send the bytes to the service and // clear the buffer. socket.flush( ); } This exam ...
Networking | 133 // back to us. socket.flush( ); } function onSocketData( event ) { var data = socket.readUTFBytes( socket.bytes ...
134 | Chapter 4: AIR Mini-Cookbook TIP The implementation of the receiving server is beyond the scope of this example. There are ...
Networking | 135 The second argument provided to theFile.upload( )method call is the name of the form field that contains the fi ...
136 | Chapter 4: AIR Mini-Cookbook <script> var file = null; function doComplete( ) { document.getElementById( "txtProgres ...
Sound | 137 file.upload( request, "image", false ); } function doUpload( ) { file.browseForOpen( "Select File" ); } </script& ...
138 | Chapter 4: AIR Mini-Cookbook Here is the relevant code snippet: var soundPath = new air.URLRequest("app-resource:/sound.mp ...
«
1
2
3
4
5
6
7
8
9
»
Free download pdf