I haven't looked too hard at whether MC's built-in stuff would help 
for this or not - it's certainly not obvious whether something that 
indicates that a change has been made to a stack is accessible.

I did something similar by creating a custom property in the stack 
(e.g., BeenChanged).  I set this property to 0 when the stack is 
opened, and then set it to 1 any time the user does something that 
changes the stack.  I can then just check this property when handling 
a closeStackRequest.

It's not as elegant as a built-in solution, and could be a lot of 
work if you've already got a lot of scripts that make changes in your 
stacks.  But as Andu noted MC may prompt even if no changes are made 
(and sometimes seems not to prompt when changes have been made), so 
I'm not sure I'd trust the built-in stuff anyhow.

Regards,
Dave Tremmel



>I am aiming toward a standalone that opens and closes several stacks.  I
>want to prompt the user to save changes in these stacks when they are
>closed.  I have written "on closeStackRequest" handlers that issue such
>prompts.  My question now is:  Is there a straightforward way to avoid
>bringing up this save prompt if there have been no changes made to the
>stack?
>
>The release notes for MetaCard 2.2.1 include this statement:
>
>    Numerous improvements to the standard UI have been made, including an
>    improve system for prompting to save your work when exiting MetaCard,
>    and protection against deleting a group that appears on multiple
>    cards.
>
>My experience with MetaCard's own save changes prompts seems to indicate
>that MetaCard has some built-in capacity to recognize if changes have been
>made to a stack and not prompt for a save if none have been made.  Is there
>any way that one could take advantage of this capacity?
>
>John Kiltinen
>
>
>
>Archives: http://www.mail-archive.com/[email protected]/
>Info: http://www.xworlds.com/metacard/mailinglist.htm
>Please send bug reports to <[EMAIL PROTECTED]>, not this list.


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

Reply via email to