ios files
gwendalwood at cox.net
gwendalwood at cox.net
Sun Jul 24 22:32:37 EDT 2011
I did figure out how to get to writing and reading files on ios, but on my second app it does not work. I still can't figure out how to print from inside ios on the iPad 2. I think maybe it can't be done yet.
Following is my code snippets for files:
**************
--write
getPathsFromFile
put specialfolderpath("documents") into temppath
set defaultfolder to temppath
put temppath&"/Defaults" into newtempath
set defaultfolder to newtempath
put the hilitedlines of cd fld "GroupThemeTitles" into grpCount
put "StudentsGroup"&grpCount into temp1
open file temp1 for write
write cd fld "Students" to file temp1
close file temp1
-- read
put specialfolderpath("documents") into temppath
set defaultfolder to temppath
put temppath&"/Defaults" into newtempath
set defaultfolder to newtempath
put the hilitedlines of me into newgroup
put "StudentsGroup"&newgroup into temp1
open file temp1 for read
read from file temp1 until eof
put it into cd fld "Students"
put the number of lines in it into studentcount
close file temp1
**************
Message: 4
Date: Sun, 24 Jul 2011 09:30:00 +1000
From: Gerry Orkin <gerry.orkin at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Subject: Re: iOS files
Message-ID: <C26A087A-6520-4F8C-AD34-FB092BB7F910 at gmail.com>
Content-Type: text/plain; charset=us-ascii
Post your code...
Gerry
-- Sent from my iPhone.
On 24/07/2011, at 2:19 AM, <gwendalwood at cox.net> wrote:
> Anyone know how to read and write files in an iOS application running on an
iPad 2?
> Also, does anyone know how to print from within the iOS application?
> Any hints would be appreciated. My routines work in the simulator for reading
and writing files, but don't work on the iPad 2.
More information about the use-livecode
mailing list