[Zope] Same name property for different propertysheets

Oscar Picasso picasso@videotron.ca
Mon, 27 Mar 2000 12:44:07 -0500


In the Z Class tutorial (page8) I read:

"Property Sheets also allow more indirect access to properties via the
propertysheets attribute. ... we could access the 'title' property via
propertysheets.stuff.title attribute in addition to simply the title attribute.
The sort of access is handy in the case where two different propety sheets
define properties with the same name."

Sounds great, so I tried to use to it to create a sort of "international" class:

myClass:
    propertysheets
        english
            name
            description
            .....


but if i try:
myClass:
    propertysheets
        french
            name
            .....

i get the following werror message:
Invalid property id, first_name. It is in use.

So it seems that contrary to what suggests the Z Class tutorial it is not
possible to have two properties with the same name in the same ZClass even if
they are in different propertysheets at least when using the management tabs to
add a new property.

Is it a mistake in the tutorial or is there another means to add a property
with a same name in another propertysheet without getting an error?