[Zope] zclass add method -- how to get at properties?

Dieter Maurer dieter@handshake.de
Thu, 30 Aug 2001 23:26:17 +0200 (CEST)


Lee Harr writes:
 > Inside that product I have a ZClass called GGG and a method GGG_addForm
 > which was created when I created the ZClass.
 > 
 > Inside the ZClass there is a propertysheet called Basic and
 > two properties s_choices which is type lines and s which is
 > a selection (linked to s_choices).
 > 
 > What I want to know is, from GGG_addForm, how do I get s_choices?
 > 
 > I try <dtml-var s_choices> but clearly that won't work.
 > The instance is not yet created. I need to get the property
 > from the class definition somehow. I am also
 > trying <dtml-var "Control_Panel.Products.abc..."> but that is ugly and
 > doesn't work either.
I just tried successfully:

     restrictedTraverse('/Control_Panel/Products/ZClassTest/ZCTest/propertysheets/common/PS').getProperty('toks')

I do not say, it could not be easier....


My product is "ZClassTest", my class "ZCTest", my property sheet "PS"
and my property "getProperty".


Dieter