[Zope] Changing ZClass Property Values

Dieter Maurer dieter@handshake.de
Thu, 5 Dec 2002 22:39:17 +0100


Edward Pollard writes:
 > I've created a ZClass with some properties. Hooray for me.
The properties live in a property sheet, right?

Lets assume, it is called "PS" (just as an example).

 > How can I change these values programatically? The only example I've
 > ever seen of manage_changeProperties in within a method of the
 > propertysheet as such:
 > 
 > propertysheets.myPropertySheet.manage_changeProperties(REQUEST)
 > 
 > I'd like to be able in python to do something like this
 > 
 > here.myObject.setProperty1(myValue)
Try:

	here.myObject.propertysheets.PS.manage_changeProperties(prop1=val1)

"PS" above is the name of your property sheet.


Dieter