[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 21:20:42 GMT
> 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...
>
Well, neither of these work...
doc.manage_addProperty('specific_topics', specific_topics, 'multiple_selection',
select_variable='list_of_selections')
doc.manage_addProperty('specific_topics', specific_topics, type=
'multiple_selection', value='list_of_selections')
..(the latter was inspired after a look at the source code. Value is used at
the point where the error message is generated).
How is the association made between the select_variable and the property?
Ron