Reloading a changed stack file

Len Morgan len-morgan at crcom.net
Sun Sep 28 16:57:40 EDT 2008


> Try the revert command, it's perfect for this, assuming you do replace  
>  the stacks on the hard disk, and are not creating new files.
>
>  On 28 Sep 2008, at 14:31, Len Morgan wrote:

This sounds like what I'm after but when I tried this, I observed something that may throw a monkey wrench (spanner on the other side of the pond) in the works.

After checking all the versions of my stacks, I opened the Application Browser and the only stacks showing were ones that had actually had some code run.  I was under the impression that merely getting custom property from a stack caused it to be loaded into memory but since it doesn't show, what exactly would revert revert to?

Also, the documentation on the revert command says that it only applies to the "current stack."  Since these stacks are not showing up in the application browser, if I later issue a "start using stack xyz" will it use the copy that is "hidden" in RAM, or will it reload a fresh copy from the hard disk?

len morgan


> > I'm back again with an "autoupdater" question.  I have an  
> > application that is made up of a bunch of stacks.  Each stack as a  
> > custom property cstkVersion that carries the current version number  
> > of that stack.  On my server, I have the latest versions of all the  
> > stacks and a text file that contains lines of the form:
> > stackfilename,stackversion
> >
> > I have one "get the ball rolling stack" that checks itself against  
> > the latest version and then downloads the latest version if the  
> > versions are different.  This part seems to be working fine although  
> > I do require the user to quit the program and restart it if it has  
> > been updated.  This whole process is started up by a stand-alone  
> > that launches this first stack and is simple enough that the stand- 
> > alone should only require changing when the engine changes.
> >
> > Now to the "real" problem/question: As I'm going through my text  
> > file of stack names/versions, I have to check the cstkVersion  
> > property of each stack on the user's hard drive against the version  
> > listed in the text file.  In order to read the property, the stack  
> > has to be loaded into memory.  My problem is how to I get rid of  
> > this in-memory copy and replace it with the new version (assuming  
> > that I had to download a new version)?
> >
> > Is it as simple as:
> >
> > if tVersionUpdated then
> >   stop using tCurrentStack
> > end if
> >



More information about the use-livecode mailing list