Page 1 of 1

trying to save data to iPad

Posted: Fri Oct 28, 2011 12:13 am
by adventuresofgreg
I used to use the following script to save and read a data file from the iPhone, and I'm using it now on the iPad, and it just won't work. When I put the saved data into a field, I get the PATH to the file, rather than the file itself.

on mouseUp
put field masterdata into md
put (specialFolderPath("Documents") & "/tmdata.livecode") into tPathToDatabase
put "file:" before tPathtodatabase
put md into URL tPathtodatabase
put URL tPathtodatabase into field "tempx"
end mouseUp

Re: trying to save data to iPad

Posted: Fri Oct 28, 2011 1:25 am
by adventuresofgreg
I got it to work. But. now i can't get it to work on closestack. When you quit an app by going to the iOS desktop, is that a "closestack"? Because this script will NOT work in "on closestack"

Re: trying to save data to iPad

Posted: Fri Oct 28, 2011 2:41 am
by Jellicle
adventuresofgreg wrote:I got it to work. But. now i can't get it to work on closestack. When you quit an app by going to the iOS desktop, is that a "closestack"? Because this script will NOT work in "on closestack"
Try "on shutdown".

Gerry

Re: trying to save data to iPad

Posted: Fri Oct 28, 2011 2:19 pm
by adventuresofgreg
That was it! Thanks. Why didnt they just keep on closestack? I mean, in iOS, what is "closestack" then?