new "documents" path works on simulator, not on device
Posted: Tue Feb 21, 2012 12:57 pm
I find that using just "documents" rather than SpecialFolderPath("documents"), as introduced in LiveCode 5.0.2, works with no problems in the simulator but not on the iPad. Can be shown in the following bits of code:
button Store
on mouseUp
set the defaultfolder to "documents"
if there is no folder "myData" then
create folder "myData"
end if
if there is no folder "myData/subFolder" then
create folder "myData/subFolder"
end if
put field "dataInput" into url("file:myData/subFolder/store.txt")
end mouseUp
button Retrieve
on mouseUp
set the defaultFolder to "documents"
put url("file:myData/subFolder/store.txt") into field "dataOutput"
end mouseUp
On the simulator it all happens as expected. On the iPad nothing happens. When I set file sharing on in the app, iTunes shows that the folders are not created with the "documents" version, but they are created with the SpecialFolderPath("documents") version.
It's not a big deal as I can continue using the old method, but it seems that something is going wrong.
Has anyone else come across this?
Cheers
Don
button Store
on mouseUp
set the defaultfolder to "documents"
if there is no folder "myData" then
create folder "myData"
end if
if there is no folder "myData/subFolder" then
create folder "myData/subFolder"
end if
put field "dataInput" into url("file:myData/subFolder/store.txt")
end mouseUp
button Retrieve
on mouseUp
set the defaultFolder to "documents"
put url("file:myData/subFolder/store.txt") into field "dataOutput"
end mouseUp
On the simulator it all happens as expected. On the iPad nothing happens. When I set file sharing on in the app, iTunes shows that the folders are not created with the "documents" version, but they are created with the SpecialFolderPath("documents") version.
It's not a big deal as I can continue using the old method, but it seems that something is going wrong.
Has anyone else come across this?
Cheers
Don