[Zope] ZClass properties and Python scripts
Casey Duncan
cduncan@kaivo.com
Tue, 14 Aug 2001 11:49:53 -0600
Gilles Lenfant wrote:
>
> Hi,
>
> I got a ZClass that has got a property sheet "infos".
> "infos" has a string property "titre"
> How do I get/change the values of such a property from a ZClass method in
> Python script ?
>
> TIA, I've tried so many things that I'm brain dead.
>
> --Gilles
>
Getting the property is easy:
expr="ZClassInstance.title"
where ZClassInstance is the id of the ZClass instance. To change the
property use:
<dtml-call
expr="propertysheets.infos.manage_changeProperties(title=new_title)">
where the ZClas instance is on the namespace stack and new_title
contains the new value for title. Substitute other property names as
additional arguments to manage_changeProperties as needed.
hth,
--
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>