[Zope] Selection property
Maik Jablonski
maik.jablonski@uni-bielefeld.de
Thu, 15 Aug 2002 09:37:44 +0200
Drew Nichols wrote:
> I am a newbie trying to set up a selection property with a python script.
>
> I call
> folder_obj.manage_addProperty ( 'prop_name', 'VALUE', 'selection', **but
> how do i add the list** )
>
> and also try
> folder_obj.manage_addProperty ( 'prop_name', list_here, 'selection',
> 'select_variable=one_of_the_list' )
>
>
> I have a list in my python script. Should i reference the list from a
> zope path.
hi,
it's a tricky game...;-)
try this: add a property to your root folder:
name = name_of_your_select_list
type = lines
enter some values.
then do this in a PythonScript and have a look at your current folder's
properties:
context.manage_addProperty ( 'prop_name', 'name_of_your_select_list',
'selection')
you must quote your 'name_of_your_select_list' when adding a selection
property.
got it?
cheers, maik
--
Maik Jablonski __o
www.zfl.uni-bielefeld.de _ \<_ Deutsche Zope User Group
Bielefeld, Germany (_)/(_) www.dzug.org