Hi Roger,

> Am 29.01.2018 um 18:41 schrieb Roger Guay via use-livecode 
> <use-livecode@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!

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.

> Thanks,
> Roger

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to