I think this will work: assign pMyProperty a symbol instead of a string

property pMyProperty, pMyList 
 
on new me 
    pMyProperty = #thisOne --assign pMyProperty a symbol instead of a string
    pMyList = [#notTheOne: [1,1,1], #thisOne: [2,2,2], #notThisOne:
[3,3,3]] 
end 
 
on myHandler me 
     put pMyList.pMyProperty --- this is my problem, it searches for a
string called "pMyProperty" instead of for my property "thisOne" 
end 
 

-----Original Message-----
From: Mark van den Elzen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 9:18 AM
To: [EMAIL PROTECTED]
Subject: <lingo-l> property's in property lists


Hello I'm new to this list, my question might had an answer before but I
need help rather quickly.
I want to extract info from a property list using a property. I know
this sounds confusing so I will use an example: 
 
 
property pMyProperty, pMyList 
 
on new me 
    pMyProperty = "thisOne" 
    pMyList = [#notTheOne: [1,1,1], #thisOne: [2,2,2], #notThisOne:
[3,3,3]] 
end 
 
on myHandler me 
     put pMyList.pMyProperty --- this is my problem, it searches for a
string called "pMyProperty" instead of for my property "thisOne" 
end 
 
 
I hope I was clear enough, any help would be appreciated! 
Mark 
 
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/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/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