[Zope] How come you can't add a multiple selection property in a python script?

complaw@hal-pc.org complaw@hal-pc.org
Mon, 11 Feb 2002 15:03:03 GMT


How come this...

doc.manage_addProperty('specific_topics', specific_topics, 'multiple_selection',
select_variable=context.list_of_selections)

.. won't work (it generates an error) when you try it from a python script. 

>From the PropertyManager.py source code on CVS:

"For 'selection' and 'multiple selection' properties, there is an
addition item in the property dictionay, 'select_variable' which
provides the name of a property or method which returns a list of
strings from which the selection(s) can be chosen."

So the source says you should be able to do it.  And you clearly can, in normal
circumstances (i.e., through the web).  So how come you can't do it from a
python script?

Ron