Am I overseeing something here?

Mark Powell mark_powell at symantec.com
Tue Feb 20 17:28:42 EST 2007


Should you not be asking 

  if char -3 to -1 of the long name of the target = "XYZ" then

Instead of 

  if char -4 to -1 of the long name of the target = "XYZ" then


--Mark


-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Klaus
Major
Sent: Tuesday, February 20, 2007 11:51 AM
To: How to use Revolution
Subject: Am I overseeing something here?

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

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list