Wednesday 22 October 2008

gadget.storage.openText()

A bit of progress with local file access.
It is nice and easy to get a file browser to open to select a file name, using framwork.BrowseForFile().
Still can't read it though. The nearest I have found is gadget.storage.openText(), which works nicely reading files stored in the gadget .gg file, but I can't get it to open other files....
Code for a simple button to demonstrate the above:

function buttonClicked() {
debug.trace("ButtonClicked");
fname=framework.BrowseForFile("*|*.*");
debug.trace("fname="+fname);

file=gadget.storage.openText("main.xml");

alert("file="+file);
}
Unfortunately code.google.com seems to be dead, or I was going to ask on the developer's forum....

1 comment:

Jonesboro Locksmith said...

Great blog, I enjoyed reading it.