trying to save data to iPad

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

trying to save data to iPad

Post by adventuresofgreg » Fri Oct 28, 2011 12:13 am

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

adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

Re: trying to save data to iPad

Post by adventuresofgreg » Fri Oct 28, 2011 1:25 am

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"

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: trying to save data to iPad

Post by Jellicle » Fri Oct 28, 2011 2:41 am

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
14" MacBook Pro
Former LiveCode developer.
Now recovering.

adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

Re: trying to save data to iPad

Post by adventuresofgreg » Fri Oct 28, 2011 2:19 pm

That was it! Thanks. Why didnt they just keep on closestack? I mean, in iOS, what is "closestack" then?

Post Reply