Change the right properties

Submitted by: peterbe
Last Edited: 2001-07-13

Category: ZClasses

Average rating is: 0.0 out of 5 (0 ratings)

This recipe is just a little reminder for you ZClass product developer.
When you change the properties of a ZClass instance you can't just do it like you can with a Python product.

All ZClass instances' properties are stored in Common Instance Propertysheet.

Only the Title and Id can be change like you change it of a Python Product.

Source (Text):
# 1) Programmatically change properties of Python Product instance

py_prod_instance.manage_changeProperties({'title':'New Title','url':''})

# 2) Programmatically change properties of ZClass Product instance

zclass_instance.manage_changeProperties({'title':'New Title'})
zclass_instance.propertysheets.whateveryounamedit.manage_changeProperties({'title':'Again New Title','url':''})

manage_changeProperties() doesn't complain if you send it unrecognized properties. That had me; so now I'm warning you lot.


No Comments