How come you can't add a multiple selection property in a python script?
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
complaw@hal-pc.org writes:
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. You pass in the *name* of the select variable, not the select variable itself...
Dieter
participants (2)
-
complaw@hal-pc.org -
Dieter Maurer