Page 1 of 1

File Management Error Livecode 5.5.3

Posted: Mon Jan 07, 2013 2:34 pm
by JacobS
Hi all,

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"
The text file is written out fine, but the last line returns "false" on the Android device. Am I storing it to the wrong path? Or is the defaultFolder resetting after I write out the file?

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 "&quote&"imgToSave"&quote&" to file("&quote&tContents[x]&quote&") as "&tFileExt
Where tRead is the data that I get from the web. tContents[x] is an array of the filenames, just to make things more clear.
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

Re: File Management Error Livecode 5.5.3

Posted: Tue Jan 08, 2013 4:32 pm
by JacobS
Update:

This has been reported as a bug. Bug number is 10636.

Jacob