I'm developing a simple (supposedly!) tool to load stacks from dropbox and run them on the iPad (personal app - not commercial).
I had a couple of self-induced problems solved elsewhere, but now I face one that has me lost.
I have used code like this to copy the livecode file from dropbox to a locally created folder (on the ipad):
Code: Select all
local lFilename
put "foobar" into lFilename
put "https://dl.dropboxusercontent.com/u/999999/"&lFilename&".livecode" into exURL
load URL exURL with message loadCompleted
on loadCompleted
put URL exURL into URL ("binfile:"&specialFolderPath("documents") & slash & lFilename )
end loadCompleted
Code: Select all
go URL ("binfile:" & specialFolderPath("documents") & slash & lFilename )
if the result is not empty then
put the result into msg
end if
The problem is: This works fine in the IDE, works perfectly in the iPad Simulator, but gives an undocumented error "no such card" in 'the result' when trying it on the actual iPad.
I have tried variations of the 'go' command - 'go stack URL ()', go stack URL with no "binfile:" and other combinations - all produce the error on the device (some also do it in the simulator)
The file is there as I don't try to run the file without a check first.
The questions are:
To copy a livecode file from a remote 'secure' URL 'https://' to a local file via the above 'loadCompleted' method - is that correct? or is there a better way?
Is there some explanation for the 'no such card' error message I get in the result?
Thanks for any help,
Dave