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() {Unfortunately code.google.com seems to be dead, or I was going to ask on the developer's forum....
debug.trace("ButtonClicked");
fname=framework.BrowseForFile("*|*.*");
debug.trace("fname="+fname);
file=gadget.storage.openText("main.xml");
alert("file="+file);
}
1 comment:
Great blog, I enjoyed reading it.
Post a Comment