Re: Replacing a stack

2007-10-24 Thread Shari
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

Re: Replacing a stack

2007-10-23 Thread Shari
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

Re: Replacing a stack

2007-10-23 Thread Len Morgan
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

Re: Replacing a stack

2007-10-23 Thread Shari
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

Re: Replacing a stack

2007-10-23 Thread Shari
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

Re: Replacing a stack

2007-10-22 Thread J. Landman Gay
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

Re: Replacing a stack

2007-10-22 Thread Shari
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

Re: Replacing a stack

2007-10-22 Thread Jeanne A. E. DeVoto
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

Re: Replacing a stack

2007-10-21 Thread Mark Schonewille
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

Replacing a stack

2007-10-21 Thread Shari
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