shutDownRequest being called twice

Doug Lerner doug at webcrossing.com
Sat Jan 24 22:39:30 EST 2004


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" <thierry.arbellot at wanadoo.fr> 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
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list