On Tue, 29 May 2001, Chris Withers wrote:
As for nicer interface... I guess you' ll have to elaborate a bit ;-)
Well, I think it's manage_changeProperties (nasty name for starters) that deletes any property you don't include in its arguments, see the interfaces wiki for details.
Nope, that's manage_editProperties, and it's just that the values get set to '', not that the property is deleted. manage_editProperties is suitable *only* to be called as the action of a web form that edits all the properties. Otherwise you want to use manage_changeProperties.
How about just replacing it with:
def modifyProperties(**kw)
...where kw is a dictionary mapping property name to property value. If it property specified in kw didn't exist, it would be created.
You can already pass manage_changeProperties a dictionary instead of REQUEST, and you can also pass it keyword arguments in addition or instead, which will cause the specified property values to get set. An interface for batch adding fields would be nice, but I would not want automatic property creation in the modify method. --RDM