Saving Changes in iOS

Klaus major-k klaus at major-k.de
Mon Jan 29 13:00:29 EST 2018



> Am 29.01.2018 um 18:57 schrieb Klaus major-k via use-livecode <use-livecode at lists.runrev.com>:
> 
> Hi Roger,
> 
>> Am 29.01.2018 um 18:41 schrieb Roger Guay via use-livecode <use-livecode at lists.runrev.com>:
>> 
>> Hi Klaus,
>> 
>> So are you saying that I create a folder called "specialfolderpath("documents”)”, add this folder to the “Copy Files” of the Standalone Application Settings, and put my MainStack into it?
> 
> no, I'm not saying this! :-)
> Please read up the specialfolderpath() section in the dictionary.
> 
> 1. specialfolderpath("documents”) is the folder inside of the application bundle where we have write permissions!
> It is already there, do NOT try to create it!

Addition, this only applies to iOS and Android!

On desktop, the documents folder is on oyur hard disk, to see it on your machine, use the message box:
answer specialfolderpath("documents")

> 2. Add your "main" stack via the "Copy files" to your app.
> 
> 3. Then do this when the app (launcher) starts (preopenstack or openstack)
> ...
> ## Stack in users docs folder, where we have write permissions, means where we can SAVE that stack:
> put specialfoderpath("documents") & "/your mainstack here.livecode" into tTargetStack
> 
> ## This is the stack you added via "Copy files":
> put specialfoderpath("resources") & "/your mainstack here.livecode" into tSourceStack
> 
> ## check if the app had already been opened before:
> if there is NOT a file tTargetStack then
>  put url("binfile:" & tSourceStack) into url("binfile:" & tTargetStack)
> end if
> 
> ## Now open that new stack in the users docs folder and save it later without problems:
> go stack tTargetStack
> ...
> 
> And don't forget to add:
> ...
> start using this stack
> ...
> to your LAUNCHER Stack before opening other stacks, so your separate "main" stack can use 
> all of its scripts, libraries, externals etc.
--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list