On Thu, Jul 06, 2000 at 09:29:53AM +0200, Joachim Schmitz wrote:
> answering to myself, cause nobody else could find the reason in the code I
> provided, because I didn't include the real culprit. Here is the very much
> abreviatet version, which also generates a transaction:
> def workform(self,REQUEST):
>     "Die Masken EinAusgabe"
>     self.form=REQUEST.form    <-- this does it
>     return "this generated a transaction"
> So don't modify the "self" of an external method.

self is the object this method is called on. So if this is method 'foo' in
Folder 'bar', called with http://www.spamandeggs.com/bar/foo, self is bar. The
EM is a method of the container object.

Indeed, setting self.form will store REQUEST.form in that object attribute,
causing Zope to commit a new version of the object. After all, you made a
change to it!

Martijn Pieters
| Software Engineer            mailto:[EMAIL PROTECTED]
| Digital Creations          http://www.digicool.com/
| Creators of Zope               http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to