save dialog problem

Sarah Reichelt sarah.reichelt at gmail.com
Sun Sep 11 16:35:57 EDT 2005


On 9/12/05, Rich Lague <laguer at ucs.orst.edu> wrote:
> I have been trying to set up a "do you want to save" dialog in an
> application that will run on both Macs and Windows. I get a result that
> don't really work from both shutdownRequest and closeStackRequest.
> 
> First I tried closeStackRequest:
> 
> [in the stack script of the substack where data is stored.]
> 
> on closeStackRequest
> 
> if the changedProp of this stack is true then
> answer "Do you want to save" with "yes" or "no"
> [more stuff here]
> pass closeStackRequest
> 
> end closeStackRequest
> 

Try putting the closeStackRequest or shutdownRequest (either should
work) in the mainStack script instead of the substack. That should
trap the menu messages as well as the close box.

You will need to refer to stack name when checking the property, but
apart from that, it should all just work fine.

HTH,
Sarah



More information about the use-livecode mailing list