| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Haaajmo Bosno!!! Registriert seit: Aug 2001 Ort: Bihać
Beiträge: 692
| Flex und SQLlite problem
Hallo, ich habe diesen Code: Code: var file:File = File.userDirectory.resolvePath("db/mainDB.db3");
var isNewDB:Boolean = !file.exists;
sqlConnection = new SQLConnection();
sqlConnection.open(file);
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConnection;
stmt.text = "SELECT * FROM appData";
stmt.execute();
var contacts:ArrayCollection = new ArrayCollection(stmt.getResult().data);
mainTxt.text = contacts.toString(); Error: Type was not found or was not a compile- time constant: File. var file:File = File.userDirectory.resolvePath(" db/mainDB.db3"); Error: Type was not found or was not a compile- time constant: SQLStatement. Ich verwende die letzte Flex SDK und mxmlc. Gruss, Mirza
__________________ http://www.oreillynet.com/pub/au/3675 |
| | |
| | #2 (permalink) |
| Perverted Hermit Registriert seit: Mar 2004 Ort: Delmenhorst
Beiträge: 12.141
|
Das geht nur mit AIR.
__________________ http://icodeapps.net | Meet me at the Flex user group Hamburg talking about CoffeeScript |
| | |
| | #3 (permalink) |
| Haaajmo Bosno!!! Registriert seit: Aug 2001 Ort: Bihać
Beiträge: 692
|
danke das heisst das muss ich mit dem amxmlc kompilieren? Gruss, Mirza
__________________ http://www.oreillynet.com/pub/au/3675 |
| | |
| | #4 (permalink) |
| Perverted Hermit Registriert seit: Mar 2004 Ort: Delmenhorst
Beiträge: 12.141
|
Das heisst, du musst überhaupt die AIR Infrastruktur nutzen. WindowedApplication als Applikation, AIR Runtime etc... ich verschiebe das nun in den richtigen Bereich.
__________________ http://icodeapps.net | Meet me at the Flex user group Hamburg talking about CoffeeScript |
| | |
| | #5 (permalink) |
| Haaajmo Bosno!!! Registriert seit: Aug 2001 Ort: Bihać
Beiträge: 692
|
Hmm, mit Air SDK und amxmlc wieder dasselbe....dieselben Fehler :-(
__________________ http://www.oreillynet.com/pub/au/3675 |
| | |
| | #6 (permalink) |
| Perverted Hermit Registriert seit: Mar 2004 Ort: Delmenhorst
Beiträge: 12.141
|
Import ist da? SWCs eingbunden?
__________________ http://icodeapps.net | Meet me at the Flex user group Hamburg talking about CoffeeScript |
| | |
| | #7 (permalink) |
| Haaajmo Bosno!!! Registriert seit: Aug 2001 Ort: Bihać
Beiträge: 692
|
Hier die komplette mxml: Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication
xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="0xFFCBA4" layout="absolute" width="300" height="300" alwaysInFront="true">
<mx:Script>
<![CDATA[
import flash.data.SQLResult;
import flash.filesystem.File;
import flash.data.SQLStatement;
import flash.data.SQLConnection;
import flash.events.SQLEvent;
import flash.events.SQLErrorEvent;
private function init(){
var file:File = File.userDirectory.resolvePath("db/mainDB.db3");
var isNewDB:Boolean = !file.exists;
sqlConnection = new SQLConnection();
sqlConnection.open(file);
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConnection;
stmt.text = "SELECT * FROM appData";
stmt.execute();
var contacts:ArrayCollection = new ArrayCollection(stmt.getResult().data);
mainTxt.text = contacts.toString();
}
]]>
</mx:Script>
<mx:TextArea id="mainTxt" width="250" height="200" x="25" y="55"/>
</mx:WindowedApplication> Ich verwende den command line Compiler von meinem DOS Window. Gruss, Mirza
__________________ http://www.oreillynet.com/pub/au/3675 |
| | |
| | #8 (permalink) |
| Perverted Hermit Registriert seit: Mar 2004 Ort: Delmenhorst
Beiträge: 12.141
|
Na die SWCs vom AIR Framework...
__________________ http://icodeapps.net | Meet me at the Flex user group Hamburg talking about CoffeeScript |
| | |
| | #9 (permalink) |
| Haaajmo Bosno!!! Registriert seit: Aug 2001 Ort: Bihać
Beiträge: 692
|
Ja die habe ich bei mir in C:\airSDK\frameworks\libs\air wie soll ich die die SWC in das Projekt einbauen?
__________________ http://www.oreillynet.com/pub/au/3675 |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Flex Tree Problem | Kuzia | Flex programmieren | 6 | 28-07-2009 08:56 |
| Flex und SWF-Loader Problem | Dr.Rock | Flex allgemein | 7 | 29-06-2009 10:33 |
| SQLLite | gigo | Adobe AIR | 2 | 17-02-2008 22:15 |
| Flex 3 - Sanbox Problem! | neknova | Flex programmieren | 11 | 23-01-2008 09:40 |
| Zinc o.ä. und SQLlite? | kugelfunk | Am Rande | 3 | 09-01-2007 13:08 |