[Dev] Collections stuff

Andi Vajda vajda at osafoundation.org
Tue Sep 2 18:52:33 PDT 2003


I fixed the bug you found today but I need to test this more so no checkin
yet. A word of caution with collections of literals when you use the python
APIs to modify them. The repository is watching for changes and only saves
items that got marked dirty because one or more of their attributes changed or
where created or deleted. When modifying a python collection directly through
append(), extend(), pop(), assignment of dictionary values, etc.., etc.., the
repository doesn't see this. You need to call Item.setDirty() at some point to
mark the item as such, otherwise your changes will not get saved. The
alternative is to use the set/add/removeValue APIs for multi-valued
attributes.

Andi..




More information about the Dev mailing list