[Zope-dev] New Counter Product

Shaw, Howard ShawH@STHS.org
Wed, 24 Mar 1999 18:11:24 -0600


Well, it is basically finished and working, combining a visible Product
interface and a counter tag... But, overriding __setstate__, removing
the temporary entry from the state, and called Persistent.__setstate__,
while generating no errors, fails to prevent the temporary entry from
being written into the database.  Please help, I need two answers!

1. How can I create a variable within a Product that will not be
persistent (i.e. will not be written to disk)?

2. What function is called at normal shutdown? I need to call a function
at shutdown to move the current value from temp to real.

Note: The counter is usable as is, so if the list members think that
Paul's now repudiated fear of constant disk growth is a non-issue, I
could drop the temporary variable, and just keep the advantages of the
interface, and the potential for an SQL based backend whilst keeping the
same front-end.

Thanks again.

Howard C. Shaw III
Programmer/SysAdmin
St. Thomas High School