I'll definitely post any updates. I always try to post my final
solution when I ask a question, so that folks searching the archives
someday can find it :-)
Okay, here's the working solution. I did not end up using revert, as
it prevented the application from loading. Maybe revert can't be
I'll definitely post any updates. I always try to post my final
solution when I ask a question, so that folks searching the archives
someday can find it :-)
My stack files all used to be in the same folder as the app, so when
somebody downloaded a new version, everything was replaced. They'd
Please keep us updated on your work with this. I had a similar problem
(trying to make sure I had the latest versions of stacks) although I
didn't go through the process of looking to see if the main stack was
open. I ended up downloading all the updated stacks (if necessary) and
then requiri
Epiphany!
Doesn't solve it, but explains it.
I think I know why the revert command causes the app not to launch.
The main app stack has this in its preOpenStack handler. So when
this script is running nothing is open yet. The objective is to
create or replace stacks if needed before anythin
if "UserPrefs" is in the stacksInUse then stop using stack "UserPrefs"
delete file prefStack
put decompress(the stackData of stack myAppStack) into \
url ("binfile:" & prefStack)
revert stack "UserPrefs" -- reloads the new one
start using stack "UserPrefs" -- if you want
I changed
Shari wrote:
Is there any chance that a stack remains in memory and that Rev
recreates it without my code telling it to?
Rev won't recreate a stack without specific instructions to do so, but
there is a chance that the stack remains in memory when you may not
expect it.
repeat with x = 1
Execute the revert command after you download the preferences stack:
revert stack prefsLocation
What the revert command does is reload the stack from the copy on
disk, replacing the copy in memory. Since the disk copy is the new
version, this will suck the new version into memory, replacing
At 6:44 PM -0400 10/21/2007, Shari wrote:
When the app launches it checks the versions, and discovers that the
stack in the Prefs folder needs to be replaced. So it deletes that
stack. In testing I have it answer someMessage and with the answer
window open, can verify that the old stack is inde
Hi Shari,
Remove the stack from memory, before opening the new version.
lock messages
delete stack "Your Stack" -- remove from memory
go stack "Mac HD/Folder/Your Stack.rev"
put the xVersion of stack "Your Stack" --> 10
unlock messages
Best regards,
Mark Schonewille
--
Economy-x-Talk Consult
This problem is buggering me. My app creates a preferences stack in
some writeable folder (Preferences on Mac OSX and varying locations
on Windows depending on the system).
I want to be able to replace this stack with a newer version if there
is a need to.
The newer version has an xVersion
10 matches
Mail list logo