[Zope] python methods for setting selection lists selected item

Dieter Maurer dieter at handshake.de
Tue Aug 19 22:54:16 EDT 2003


Jon Fox wrote at 2003-8-18 21:47 -0400:
 > ...
 > doc.manage_addProperty('newsFormatOptions', ['StructuredText','xhtml'],\
 >     'lines')
 > doc.manage_addProperty('newsFormat', 'newsFormatOptions', 'selection')
 > 
 > but how do I assign the proper selection states in a python script? 

You use "manage_changeProperties" (see the "PropertyManager" API
(e.g. in the embedded Online help)).

 > How do I set or test what the current selection is in the selection? 

You can use "getProperty" (from the "PropertyManager" API) or
simple "doc.yourProperty".


Dieter



More information about the Zope mailing list