I want to add a Selection property to an object. What format to I write the multiple values in - I must be doing something wrong, cause every time I try to make a selection property I get the following error: Traceback (innermost last): File /itamar/Zope-2.0.1-linux2-x86/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /itamar/Zope-2.0.1-linux2-x86/lib/python/ZPublisher/Publish.py, line 179, in publish File /itamar/Zope-2.0.1-linux2-x86/lib/python/Zope/__init__.py, line 201, in zpublisher_exception_hook (Object: ElementWithAttributes) File /itamar/Zope-2.0.1-linux2-x86/lib/python/ZPublisher/Publish.py, line 165, in publish File /itamar/Zope-2.0.1-linux2-x86/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_addProperty) File /itamar/Zope-2.0.1-linux2-x86/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: manage_addProperty) File /itamar/Zope-2.0.1-linux2-x86/lib/python/OFS/PropertyManager.py, line 274, in manage_addProperty (Object: ElementWithAttributes) File /itamar/Zope-2.0.1-linux2-x86/lib/python/App/special_dtml.py, line 120, in __call__ (Object: manage_propertiesForm) (Info: /itamar/Zope-2.0.1-linux2-x86/lib/python/OFS/properties.dtml) File /itamar/Zope-2.0.1-linux2-x86/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: manage_propertiesForm) File /itamar/Zope-2.0.1-linux2-x86/lib/python/DocumentTemplate/DT_In.py, line 691, in renderwob (Object: propertyMap) File /itamar/Zope-2.0.1-linux2-x86/lib/python/DocumentTemplate/DT_Util.py, line 321, in eval (Object: _.has_key(select_variable)) File <string>, line 0, in ? NameError: (see above)
Itamar wrote:
I want to add a Selection property to an object. What format to I write the multiple values in - I must be doing something wrong, cause every time I try to make a selection property I get the following error:
(Object: _.has_key(select_variable)) File <string>, line 0, in ? NameError: (see above)
I think you have to say name="somename:list" so that even if only one value is selected it makes the passed ... item a dictionary (or hash if you're used to perl). -- mindlace Disclaimer: Any use of this email, in any manner whatsoever, will increase the amount of disorder in the universe. Although no liability is implied herein, the reader is warned that this process will ultimately lead to the heat death of the universe.
participants (2)
-
Ethan Fremen -
Itamar