Problem Calling Custom Card Props with the Same Name Using Switch

DunbarX at aol.com DunbarX at aol.com
Sun Nov 29 20:29:39 EST 2009


Confirmed. And it's odd, because the property value is there, at least 
right at the beginning:

on mouseUp
    put ""
    put return & "y" && the y of this card   && "z" && the z of this card 
after msg

--both properties are present at this stage
    
    put the short name of this card
    switch the short name of this card
       case "First Card"
          put the x of this card into x
          put the y of this card into y
          put return & "x" && x && "y" && y after msg
          break
       case "Second Card"
          put the y of this card into y
          put the z of this card into z
          put return & "y" && y && "z" && z after msg
          break
    end switch
end mouseUp

The value is lost along the way, even though stepping through the script 
shows nothing untoward.

Craig Newman
In a message dated 11/29/09 7:57:58 PM, gregory.lypny at videotron.ca writes:


> 
> on mouseUp
>    put the short name of this card
>    switch the short name of this card
>       case "First Card"
>          put the x of this card into x
>          put the y of this card into y
>          put return & "x" && x && "y" && y after msg
>          break
>       case "Second Card"
>          put the y of this card into y
>          put the z of this card into z
>          put return & "y" && y && "z" && z after msg
>          break
>    end switch
> end mouseUp
> 




More information about the use-livecode mailing list