> How can you tell when you have made changes to the stack in memory and
> therefore need to save it when it is closed. Do you have to tracke every
> change? The save command seems to save even when you have done nothing -
> right.
> 
> Can you do something fancy like an MD5digest of the stack in memory??? The
> issue is that it takes a long time to save a database stack as it gets large,
> and I don't want to loose data. What's the best strategy?

You could put a frontScript which traps for data-changing messages
(closeField, resizeControl, etc.), and simply sets a global.  When you save,
you just clear that global and you're done.  On closeStackRequest, you can
check the value of this global to determine if the stack needs saving.

Alternatively, if you have multiple documents in your setup you might want
to use a custom stack property instead of a global.

To prevent data loss, you could use MC's timers to create a routine which
periodically saves every few minutes.  I'm building this into an app now at
the request of some customers, and it's pretty straightforward.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Multimedia Design and Development for Mac, Windows, UNIX, and the Web
 _____________________________________________________________________
 [EMAIL PROTECTED]                 http://www.FourthWorld.com
 Tel: 323-225-3717           ICQ#60248349            Fax: 323-225-0716



Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to