From: Keats <ke...@ea...> - 2003-07-14 17:23:05
|
... > For example, I discovered (partly to my horror) that WM supports > "PropertyMethod" - a way of getting a property NAME from a function: > > #set $propnameProvider.SomeProp = "marc" > #set $var = $propnameProvider.get("SomeProp").SomeOtherProp > > This looks somewhat bizarre and horrendous to me. Does -anybody-actually > use it? > I'm not sure what you're talking about. Do you mean the .get()? If so, this is what is known as the "round bracket hack" and it is necessary to deal with dynamic property names ($var.get($propName)) or non-compliant property names ($var.get("Some wacky property!?@#$%!")). [BTW, AFAICT, the above code will fail since the string "marc" doesn't have a "SomeOtherProp".] Keats |