You can just do:
put getAt(pMyList, pMyProperty)
-- [2, 2, 2]
Be careful mixing strings and symbols - it doesn't work with special characters, including spaces.
If they're all symbols, use symbols (it'll be faster anyway).
If they're all strings, use strings. Strings can be properties too, as in:
pMyList =["not the one":[1,1,1], "this one":[2, 2, 2], "I love Lingo":[3,3,3]]
- Tab
At 10:18 AM 12/19/02, Mark van den Elzen wrote:
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!]