Stacks inside OSX Package
Sivakatirswami
katir at hindu.org
Sat Jul 12 16:30:16 EDT 2008
I rarely contribute here because I feel was outclassed. But sometimes
things can be simple.
I know that many know this already, but because newbies may not...
I just did my first standalone where I added a data stack (where data is
saved) right inside the standalone package on OSX. I build in house
production tools for our editors and team here for different things. and
distribution of a "player" and the actual "app" (which was a stack that
needed to save data and has all the functional code in it) as two
component thing was a bit of a nuisance. Things inevitably get
separated... Now I can tell everyone "it's double clickable, no
problem, when you are finished, just put it back on the server..."
I can even dig that data stack, from inside the app, over the network
from their public folder and update it and read or extract their work...
I should try Ken Ray's stack runner one day...For those who may not have
the time or need for such things as the GLX framework (I still have the
documentation on my desk, not sure when I will ever get a chance to read
it...)
From the House of Keep It Simple:
All you really need to get started in your splash screen is:
on openstack
send "BootMe" to me in 2 seconds
end openstack
on BootMe
topLevel "MyDataStack.rev"
end BootMet
On closeStack
if the environment <> "development" then quit
end closeStack
then make your standalone and then put your "MyDataStack.rev" in
MyStandAlone.app
/Contents
/MacOS
MyStandAlone # this is the *real* standalone inside the package
MyDataStack.rev
Just make sure you have a lot of save routines in your MyDataStack.rev
on closestack
save this stack
end CloseStack
a save button on the UI (or menus)
I also always add an auto save (every five minutes) to most of my stuff
that I distribute to volunteers
on openStack
send "SaveMe" to me in 300 seconds
end OpenStack
on SaveMe
save this stack
send "SaveMe" to me in 300 seconds
end SaveMe
and I never get any support calls for "Oh, I did this or that and lost
everything."
Meanwhile The Great Adobe, clobbers me on the head with problems at
least 2 or three times a month.
Freeze, force quit, can't reboot, got to go and trash bogus recovery
files and cache, restart your machine and *maybe* just maybe the work
you were doing up to the point of the crash was saved... or not..
point: Revolution is probably one of the most stable apps on my machine.
More information about the use-livecode
mailing list