[Zope-dev] getPropertyType returns None in ZClass

Jonothan Farr jfarr@real.com
Sun, 21 Nov 1999 14:54:22 -0800


> I tried to list all properties in a ZClass instance and check their types.
> I used the following code (within the ZClass; 'infos' is a custom
> propertysheet name):
>
> <dtml-in "propertysheets.infos.propertyIds()">
>   <LI><dtml-var sequence-item> -
>       <dtml-var "getPropertyType(_['sequence-item'])"> -
>       <dtml-var "hasProperty(_['sequence-item'])">
> </dtml-in>
> </UL>
>
> This is the result:
>
>       title - string - 1
>       description - None - 0
>       adresse - None - 0
>       modele_lien - None - 0
>       lien - None - 0

It looks like you need to call "propertysheets.infos.getPropertyType(...)" and
"propertysheets.infos.hasProperty(...)".

--jfarr