closeStackRequest Issue

FlexibleLearning at aol.com FlexibleLearning at aol.com
Wed Jan 21 12:00:07 EST 2004


Dave:

>I am trapping the closeStackRequest message to allow a user to discard/save
>pending edits. This works fine when I close the stack using the close button
>of the stack window. I have a button control on the card whose handler
>is simply;
>
>on mouseDown
>   close this stack
>end mouseDown
>
>The above handler closes the stack regardless and to my mind does not trigger
>the closeStackRequest. I'd be grateful for any clues. Thanks.

closeStackRequest is triggered when the closeBox is clicked, so you need to 
trap both events...

on closeStack
  checkSave
end closeStack

on closeStackRequest
  checkSave
  pass closeStackRequest
end closeStackRequest

on checkSave
  ... do your stuff here
end checkSave

/H


More information about the use-livecode mailing list