Indirection question
Yves COPPE
yvescoppe at skynet.be
Wed Feb 19 15:29:01 EST 2003
>I have a variable named "theM" in which I am storing any number of
>comma-delimited items. If I use the message box for something like
>"answer theM", I get a dialog with the list of the items in the var.
>So far, so good.
>
>I have other vars with similar names (theW, theH, etc.) that contain
>other comma-delimited lists. I also have another variable
>(currentLetter) whose content changes (in this case: from "M" to "W"
>to "H" and back again in no consistent order). I have to check the
>content of currentLetter before knowing which of these lists I must
>manipulate. What I'd like to do is something like:
>
>on mouseUp
> if currentLetter = "W" then put "theW" into theList
> (etc)
> answer theList
>end mouseUp
>
>Now, if I do this, the answer dialog shows "theW" instead of the
>contents of the var named theW. Obviously, I'm not referring to the
>variable in the appropriate manner.
>
>Any ideas?
>
Don't use quotes !!
it's a variable and not a litteral
put theW and not put "theW"
Hope this helps
--
Greetings.
Yves COPPE
Email : yvescoppe at skynet.be
More information about the use-livecode
mailing list