AW: lingo-l setting the properties of me by a variable

2005-10-06 Thread Michael von Aichberger 2
Thanks to all who answered to my question. I pretty quickly discovered by myself that setAprop was the solution. To the question of Tom, whether I use it in a behaviour or a parent script: Parent script is the answer. And to Irv's concern that my approach would break encapsulation, I am not

Re: AW: lingo-l setting the properties of me by a variable

2005-10-06 Thread Irv Kalb
I would say that the way that you are trying to set these properties violates very basic OOP principles. The principle of encapsulation is based on the idea that the only thing you can know about an object is the API (the Application Program Interface) that the object has. This is the list of

lingo-l setting the properties of me by a variable

2005-10-05 Thread Michael von Aichberger 2
Hi List, in an object, I can easily set a property like this me.pSomething = 1 But what, if I have the name of the property in a variable? Like myProp = symbol(pSomething) Writing me[myProp] = 1 doesn't work, set myProp of me to 1 doesn't work either. Any solution? Thanks in advance!

Re: lingo-l setting the properties of me by a variable

2005-10-05 Thread Cole Tierney
Hi Michael, But what, if I have the name of the property in a variable? Does the following work? me.setAProp(myProp, some value) -- Cole [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

Re: lingo-l setting the properties of me by a variable

2005-10-05 Thread Irv Kalb
I believe that Jeff's suggestiong of using getAProp and setAProp will work. However, by doing this you are really breaking encapsulation. That is, you are allowing code outside of an object to reference property variables inside the object directly. A different approach is to use a case