I have just recently updated from Livecode 5.5.1 to LC 5.5.3 and some of my sandbox-file code has stopped working. The code below all worked in LC 5.5.1, but for some reason does not work on an Android device once compiled using LC 5.5.3.
First example, I used this code many many times in my app to read a settings file for the app:
Code: Select all
set the defaultFolder to specialFolderPath("documents")
open file "Logindata.txt" for write
write (text of field "UserName") & cr & (the icon of btn "RememberMe") & cr & /* some more data */ to file "Logindata.txt"
close file "Logindata.txt"
answer there is a file "Logindata.txt"
Another example; this code I use to store some jpgs and png's that I get from a webservice within the app:
Code: Select all
set the text of image "imgToSave" to tRead
set the defaultfolder to specialfolderpath("documents")
put tContents[x] into tName
split tName by "."
put tName[2] into tFileExt
replace "jpg" with "JPEG" in tFileExt
do "export image ""e&"imgToSave""e&" to file(""e&tContents[x]"e&") as "&tFileExt
I did some debugging and found that it crashes on the last statement, the "export" one.
Another weird thing is that everything still works fine in the IDE, just not when you put it on the actual Android device.
All of this code worked fine in LC 5.5.1 but when I updated it to 5.5.3 it stopped working. Has something changed that I missed? I read through the release notes for 5.5.2 and 5.5.3 but have not found anything related to this type of syntax changing.
Any ideas?
Thanks,
Jacob