a basic stupid splashscreen question
chipp at chipp.com
Tue Jan 4 05:10:54 EST 2005
Here's one way to do it.
Have your standalone have a substack called "dataTemplate." Because
"dataTemplate" is a subStack of a standalone, you can never save it. So,
when your app launches, you can do the following: (from my memory so
please forgive typos)
go inv stack "dataTemplate"
set the name of stack "dataTemplate" to "myDataFile"
save stack "dataTemplate" as "myDataFile.rev"
-->THIS SAVES IT IN THE SAME DIRECTORY AS YOUR STANDALONE
-->AND NOW YOU CAN OPEN IT, WRITE TO IT AND SAVE IT
delete stack "dataTemplate"
-->THIS REMOVES dataTemplate FROM MEMORY
go inv stack "myDataFile.rev"
-->NOW myDataFile.rev IS OPEN AND CAN BE REFERRED TO BY
-->ITS NAME "myDatafile"
-->DO STUFF TO STACK myDataFile
compact stack myDataFile
save stack myDataFile
Notice, I'm keeping the data stacks invisible. I do this so that I can
really separate the data from the presentation layer of the app. I copy
the data I need to the main stack where it is edited/modified/tweaked
and copied back to the data stack and saved.
Hope that helps,
kee nethery wrote:
> So in the folder containing the main spash screen stack, when the user
> first installs this bundle of joy, they will have A) one App and one
> stack or B) they will have just one App and no loose stacks sitting
> around. Then when they launch the App, it will find 1) the App in the
> same folder or 2) it will save the stack off to the same folder, or 3)
> it will save it somewhere else and then save a preferences file
> someplace to tell it where it put the data stack? This extra data stack
> is I) your stack that has all the actual code in it that does what the
> App does or it II) just contains data and the splash screen App has the
> actual code in it?
More information about the Use-livecode