[Zope] setting Zclass instance id based on properties

Small Business Services toolkit at magma.ca
Tue Dec 2 13:11:15 EST 2003


Charlie Kalech wrote:
> I would like to set the id of a Zclass instance based on some of the
properties
>
> I can not use the property variables in the add method since the
> properties have not yet been assigned a value
>
> For instance let's say I have three properties: Section, Chapter and Page
>
> How do I assign the id the value <dtml-var Section>-<dtml-var
> Chapter>-<dtml-var Page> when I create the zclass instance?

There is no data in the 'Section', 'Chapter' or 'Page' until after you
create an instance of your ZClass and assign some value to the properties.
The property fields of a ZClass are just 'field names' until you create an
instance of that ZClass, so you can't do anything with them.

What are you trying to accomplish?

Jonathan



>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )




More information about the Zope mailing list