How to force a reload of a datastack.

Scott Rossi scott at tactilemedia.com
Sun Jan 2 13:45:48 EST 2011


I haven't tested your script but wanted to suggest looking at the "revert" command as I believe this is supposed to force the reload of a stack.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


On Jan 2, 2011, at 10:38 AM, Ian McKnight <iangmcknight at gmail.com> wrote:

> Hi
> 
> 
> Could someone confirm (or otherwise) that what I hope to happen with this
> script will indeed happen?
> 
> I have a stack loaded into memory at start up. I have exclusive use of it
> for a period of time. When the time runs out someone else can use and change
> the stack. But I want to use the data stack again - after it has been
> changed by someone else but as I haven't quit my program I still have the
> 'old' version in memory. Will this script force the file to be re-read from
> disc?
> 
> command openDataFile pName
>   --------------------------------------------
> 
>   if gWaitingToGoAgainAfterTimeOut = false
>   then
> 
> -- load the file first time of asking
> 
>      put "data/"&pName into tName
>      open invisible stack tName
> 
>   else
> 
> -- stack could have changed
> -- clear my old version out of memory
> -- and load stack again
> 
>      set the destroyStack of stack pName to true
>      close stack pName
>      open invisible stack tName
> 
>   end if
> end openDataFile
> 
> Thanks for any feedback.
> 
> And a Happy New Year to all.
> 
> 
> -- 
> Regards
> 
> 
> Ian McKnight
> 
> iangmcknight at gmail.com
> =======================
> _______________________________________________




More information about the use-livecode mailing list