-----BEGIN PGP SIGNED MESSAGE-----
Jonas Nielsen wrote:
> Hi this is probably a little vague but any help is appreciated.
> I'm developing on an old zope application, which I ported from zope
> 2.5.1 to zope 2.9. The application seems like it's based on the
> addressbook application in the "Zope Bible"
> The application is a tool for localization, where translators can log in
> and edit "translation resources" in "resource folders"
> I made a function to export all these resources to a csv-file and one to
> import the values in the zodb again.
> the text are set using a function on the resource calling
> def setText(self,language,text, REQUEST=None):
> # ... some stuff
> self.texts[language] = text
> The function works fine and updates the values correctly. But after I
> restart zope all the changes are lost. This not so when calling the
> function from the Resource objects web form.
> The "Zope Bible" says something about calling self.__changed__(1) after
> updating the value but this doesn't seem to work even though the objects
> inherits from "Persistent"
> When importing I fetch the object by using the RestrictedTraverse
> function, that's really the only difference I can see.
> Please write if you have ANY idea of what could be the problem.
You are mutating the 'texts' attribute of your object, which is likely a
dict. Try making it either a PersistentMapping or an OOBTree, each of
which know about persisting their changes.
Tres Seaver +1 540-429-0999 [EMAIL PROTECTED]
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v126.96.36.199 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -