Yet another Newbie Question
Dave
dave at looktowindward.com
Wed Apr 4 04:48:23 EDT 2007
Hi,
If you intend to build standalone apps you should be aware that you
CANNOT write back data to the Stack that is the "main" application.
There are a number of ways around this which also address your
questions below. The method I use is to have one stack that is the
main application "Splash" screen. This stack doesn't have to actually
display anything and is really just a place holder to load the RunRev
Engine. This stack then calls up .rev files (that are buried in the
App Bundle on MacOS X). I use the following folder structure:
SplashStack.app (Bundle)
SplashStack.app/Contents/MacOS/MakeTestMovie (Real
Application or Standalone)
SplashStack.app/Contents/MacOS/RunRime
(RunTime Folder Created by RunRev when you build a standalone)
SplashStack.app/Contents/MacOS/RunRime/Database/ (This folder
is used to contain Data files used by your app)
SplashStack.app/Contents/MacOS/RunRime/Externals/ (This
folder is used to contain External files used by your app)
SplashStack.app/Contents/MacOS/RunRime/Images/ (This
folder is used to contain Images files used by your app)
SplashStack.app/Contents/MacOS/RunRime/Stacks (This
folder is used to contain the real Stack Files files for your app)
You can set all this up in the Standalone settings panel which is run
run the Splash Screen Stack. Depending on what you are doing you may
also need some code in the Splash Screen Stack that runs when a
Standalone is saved and copies files to the right places. I need to
do this with my apps.
Using this approach if you want to use a stack to hold your data,
then you just use a separate stack that just holds the data. Then
versions 1, 2, 3 etc. just access this stack so you have no need to
worry about transferring data between versions. You can equally well
use separate data files or a mixture of the two techniques.
The other advantage of this approach is that you can also re-use
stacks in other applications and it makes adding or updating an
application as simple as replacing just the file(s) in question.
My ISM module and the framework basically work like this.
Hope this helps
Dave
On 3 Apr 2007, at 17:20, Simon HARPER wrote:
> Hi there,
> so I've a couple of questions (which may be silly)
>
> 1) If I create version 1 of an application which saves data as a
> stack - then create version 2 which adds functionality (but
> probably doesn't change the data format) how do I get the stack
> data from version 1 into the newly installed version 2?
>
> 2) It seems that a good idea is to create a Library and Data
> Manager stack, so now I'm wondering is it 'better' to push all data
> to disk, as say xml or text, then reload it all into an array in
> the Data Manager and then step through the array and perform all
> other actions on the array - if you like - a kind of abstraction?
> which leads me to the question - is there the concept of a record
> structure as in c/c++ or is it best to use a 2 dimensional array?
>
> Sorry once again if this is all obvious.
>
> Cheers
> Si.
>
> ====
> Simon Harper
> 2.44 Kilburn Building
> University of Manchester (UK)
>
> Pri: simon.harper at manchester.ac.uk
> Alt: sharper at cs.man.ac.uk
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list