RE: lingo-l property's in property lists
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!]
Re: lingo-l property's in property lists
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 Try this: put pMyList.getProp(pMyProperty) That works if pMyProperty is a string or a symbol. Cordially, Kerry Thompson [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!]
RE: lingo-l property's in property lists
Thanks a lot, well worth looking into. Been working to hard I think, I'm overlooking obvious things. Well almost Christmas :D - 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 ng 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!]
Re: lingo-l property's in property lists
Am 19.12.2002 16:18 Uhr schrieb Mark van den Elzen unter [EMAIL PROTECTED]: 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 Of course. Use put pMyList[pMyProperty] Florian 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!]
Re: lingo-l property's in property lists
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!]
Re: lingo-l property's in property lists
even: put pMyList[pMyProperty] will work with a symbol or a string hth Fraser Try this: put pMyList.getProp(pMyProperty) That works if pMyProperty is a string or a symbol. Cordially, Kerry Thompson [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!]