At 1:30 PM -0800 1/23/2002, Chipp Walters wrote:
>switch (the target)
> case (contains "button")
> set cursor to hand
> break
>end switch
>
>when I compile I get:
>
> � There was a Script Compile Error at 3:23:25 PM
>Error description: Expression: double binary operator
>Object: stack "C:/Documents and Settings/Chipp/My
>Documents/HemwayClients/ProfMoe/Uploader04.rev"
>--------------------
>case (contains "button")
>--------------------
>Value: contains
The problem with this one is that you can't use an operator in a case
statement. The syntax is either
switch {expression}
case {value}
{statements}
end switch
or
switch
case {expression}
{statements}
end switch
If you use the first form, the {value} in each case statement is tested for
equality with the {expression} at the top. Your {value} statement isn't a
value that can be tested for equality; instead it's the second half of an
expression. So Rev is trying to evaluate
if (the target) is (contains button)
and this is why you get the complaint about a double binary operator.
You can write this as
switch
case (the target contains "button")
set cursor to hand
break
end switch
(If you have a lot of cases and they're all testing the target, for better
speed you can do this:
get the target
switch
case (it contains "button")
[etc]
>Also, still can't figure out what "uquoted literal" means in the following
>error:
>
> � There was a Script Compile Error at 3:24:24 PM
>Error description: Expression: unquoted literal
>Object: stack "C:/Documents and Settings/Chipp/My
>Documents/HemwayClients/ProfMoe/Uploader04.rev"
>--------------------
>if not exists(stack "revMenubar") then
>--------------------
>Value: 65.104.229.45
That almost looks like the compiler's wrong about the line the error is on.
What's in the previous line?
--
Jeanne A. E. DeVoto ~ [EMAIL PROTECTED]
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!
_______________________________________________
improve-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/improve-revolution