How to store some data in my stack

Takashi Yoshino yoshino at sys.wakayama-u.ac.jp
Wed Jan 25 19:05:52 EST 2012


Hi, Klaus

Thank you for your help!

> - Read button
> on mouseUp
>  put specialFolderPath(“documents”) & "/" & “testFile.txt” into tFile
>  if there is a file tFile then
>    put URL("file:" & tFile) into fld "Data"
>    put the result into fld "msg"
> else
>  answer "No file yet!"
> end if
> end mouseUp

"no file yet!" is shown in an android.

'Write' function can't work, that is,
  put fld "Data" into URL("file:" & specialFolderPath(“documents”) & "/" & “testFile.txt”)
 is not working on an android.

Did someone succeed in writing a file on android? 

I tried rev online user sample.
Android-> List Files and Folders 2.

On an android, list files work well, but write files did not work…


_.__ ._ _. ._ ._.__ .. ._._. _._ . ..__ ._.__ ._._. ___. .._ __.. __ .._ 
Takashi Yoshino 
http://www.wakayama-u.ac.jp/~yoshino/lab/
Tel: +81-73-457-8441

On 2012/01/26, at 1:04, Klaus on-rev wrote:

> Hi Takashi,
> 
> Am 25.01.2012 um 16:56 schrieb 吉野 孝:
> 
>> Hi, Klaus
>> 
>> Thank you for your quick reply!
>> 
>> I changed my script, but it does not work on an android.
>> (It does work on my mac.)
>> 
>> The following are the test script.
>> (URL is very easy! thanks)
>> 
>> - Write button
>> on mouseUp
>>  put fld "Data" into URL("file:" & specialFolderPath(“documents”) & "/" & “testFile.txt”)
>>  put the result into fld "msg"
>> end mouseUp
> 
> What is "the result" here?
> 
>> - Read button
>> on mouseUp
>>  put URL("file:" & specialFolderPath(“documents”) & "/" & “testFile.txt”) into fld "Data"
>>  put the result into fld "msg"
>> end mouseUp
>> # "/" -> ":"(mac) 
>> On my mac, those scripts work well.
>> 
>> But, on my android, "can't open file" is shown in field "msg"
> 
> Sorry, have no android license, no idea what's going wrong here.
> 
> Maybe you should check first, if the file exists?
> 
> - Read button
> on mouseUp
>  put specialFolderPath(“documents”) & "/" & “testFile.txt” into tFile
>  if there is a file tFile then
>    put URL("file:" & tFile) into fld "Data"
>    put the result into fld "msg"
> else
>  answer "No file yet!"
> end if
> end mouseUp
> 
> 
> 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> http://www.major-k.de
> klaus at major.on-rev.com
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list