Good question. I never asked myself about it before, I just used local variable to share and retain value within handlers in the same script and it does work.

I found this in the documentation :

The value of a script local variable is retained between handlers, but is lost when you quit the application, when you close the stack (unless its destroyStack property is false), or when the script is re-compiled.

So, if you are in one of those cases, you can use a script local variable.

Thierry.

Le Sunday, 25 Jan 2004, à 04:39 Europe/Paris, Doug Lerner a écrit :

Wouldn't you have to make the processingShutDown flag a global to retain its
value for something like this?


doug

On 1/25/04 1:40 AM, "Thierry Arbellot" <[EMAIL PROTECTED]> wrote:

try this

local processingShutDown = false

on shutDownRequest
 if processingShutDown = false then
   answer "Are you sure you want to quit?" with "No" or "Yes"
   if it is "Yes" then
     put true into processingShutDown
     pass shutDownRequest
   end if
 end if
end shutDownRequest

Hope it helps

Thierry

Le Saturday, 24 Jan 2004, à 15:25 Europe/Paris, Doug Lerner a écrit :

I am seeing my "are you sure you want to shut down" twice (the
shutDownRequest handler) prompt twice now.

I think the reason for this is that I added an

insert script for stack "mainstack" into back

so I could make use of the mainstack handlers in all the stacks.

But the shutDownRequest handler looks like this:

on shutDownRequest
  answer "Are you sure you want to quit?" with "No" or "Yes"
  if it is "Yes" then
    pass shutDownRequest
  end if
end shutDownRequest

I need to "pass shutDownRequest". I think the "pass shutDownRequest" is
passing it "up" the path and it is re-encountering itself in the
backScripts.


Any ideas of how to avoid this problem?

Thanks,

doug

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to