[Qt-qml] QML : js File handling
Jason H
scorp1us at yahoo.com
Mon Jan 17 16:15:04 CET 2011
I believe your only option in QML is to use the database stuff...
Or QtScript. The only connection QtScript has to Javascript and browsers is that
they use the same ECMA standard for syntax. (
http://labs.qt.nokia.com/2007/01/05/say-hello-to-qtscript/ )
Which raises the question for me, where is the QtScript API documentation? I am
not talking about the C++ API, ( http://doc.qt.nokia.com/4.7/qtscript.html ) but
rather the QtScript DOM and objects? Back in the day, The QtScript bindings
generator would generate bindings for QObjects and their public signals/slots
and properties. I've not followed it recently, but do things like
QString.replace(a,b) work? (this might be a bad example as there might be a ECMA
script string API, so say QFile, and QFile.open(), etc.)
I also recommend reading ( http://doc.trolltech.com/4.7/scripting.html )
________________________________
From: "badrinath.chandi at nokia.com" <badrinath.chandi at nokia.com>
To: qt-qml at qt.nokia.com
Sent: Mon, January 17, 2011 12:36:10 AM
Subject: [Qt-qml] QML : js File handling
Hi ,
Need one small help , I got struck up with filehandlers in java script. which
I am importing to my main qml file.
it says "ReferenceError: Can't find variable: fopen" , pasted the following
code.
functionpicturefile(theFolder){
varfso=newfopen("Scripting.FileSystemObject");
if(fso.folderExists(thefolder)){
bbb=fso.GetFolder(thefolder)
oFileColl=newEnumerator(bbb.files);
abc=newArray();
i=0
for(;!oFileColl.atEnd();oFileColl.moveNext())
{
tempp=newString(oFileColl.item());
abc[i]=tempp;
i++;
}
}
returnabc;
}
basically i want to get the file names in a folder through this.
can anybody please help me with this?
Thanks & Regards,
Badri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110117/fd2fbc0f/attachment.html
More information about the Qt-qml
mailing list