[ZDP] BackTalk to Document Zope Developer's Guide (2.4 edition)/Zope Products
webmaster@zope.org
webmaster@zope.org
Sun, 03 Nov 2002 18:18:41 -0500
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZDG/current/Products.stx#4-40
---------------
A 'w' present in the mode string indicates that the value of the
property may be changed by the user. A 'd' indicates that the user
can delete the property. An empty mode string indicates that the
property and its value may be shown in property listings, but that
it is read-only and may not be deleted.
% Anonymous User - Nov. 3, 2002 6:12 pm:
Example:
_properties=({'id' : 'favorite_color',
'type' : 'selection',
'select_variable' : 'getColors'
},
)
% Anonymous User - Nov. 3, 2002 6:18 pm:
# Example of mode:
_properties=(
{'id':'title', 'type':'string', 'mode':'w'},
{'id' : 'favorite_color',
'type' : 'selection',
'select_variable' : 'getColors'
'mode':'wd'},
)
# In this case, we don't want the user to delete the property
# of 'title'. They can change it, but not remove it altogether.