actually that will cause an error

use this instead 
symbol( "roomunit" & currentUnit)
----- Original Message ----- 
From: "Kerry Thompson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 20, 2001 8:38 AM
Subject: Re: <lingo-l> Small problem!!!


> 
> >
> >What I have is a property list ('gMechFailure') with 12 properties
> >('roomunit1' through to 'roomunit12'). I want to access these properties
> >based on the value of a dynamic variable.
> >
> >if gMechFailure[ #roomunit & currentUnit ] = "foo" then
> >   nothing
> >end if
> 
> Hi Malcolm,
> 
> The problem is that Director converts the symbol to a string when you 
> concatenate the currentUnit variable.
> 
> Try this:
> 
> if gMechFailure[symbol(#roomunit & currentUnit)]
> 
> Cordially,
> 
> Kerry Thompson
> 
> 
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
> email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo.  Thanks!]
> 


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to