Am I overseeing something here?

Klaus Major klaus at major-k.de
Tue Feb 20 13:51:24 EST 2007


Hi friends,

I have a stack "XYZ" that I start using.

Then I wrote a "closestack" handler and surely do not want to let ALL  
stacks execute it.
So I wrote an "if... then..." clause to filter other stacks.

But only solution 1 does work, solution 2 does NOT?

To me the logic is identically, but maybe I am overseeing something  
obvious here?
Any hints and explanations are very appreciated!


Solution 1 does work:
on closestack
   if char -4 to -1 of the long name of the target = "XYZ" then
     do this and that ONLY for stack XYZ
  ...
   end if
end closestack


Solution 2, does NOT work, "do this and that..." IS being executed by  
other stacks:
on closestack
   if NOT char -4 to -1 of the long name of the target = "XYZ" then
      exit closestack
   end if
   do this and that ONLY for stack XYZ
   ...
end closestack


What do I miss here???


Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list