Brad, Your right, no error was caused the first way, & yes, i am using the second way....
Thanks again for all your help.. MangO -----Original Message----- From: brad condran [mailto:[EMAIL PROTECTED]] Sent: 20 November 2001 21:16 To: [EMAIL PROTECTED] Subject: Re: <lingo-l> Small problem!!! sorry, no it won't cause an error ,but you should still use the second way, since it will be clearer that you are turing a string into a symbol ----- 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!] [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!]
