[ZODB-Dev] How to predict George Bailey?
Mike C. Fletcher
mcfletch@rogers.com
Sun, 03 Nov 2002 17:17:10 -0500
Well, at least one other person has done a long connection app with undo
support (me). ConflictSolver (a room-scheduling application) uses ZODB4
and I had a few problems dealing with connections across undos.
Basically I "solved" it by using a specialised "database weak-ref"
almost everywhere there was a pointer to a persistent object (I say
almost as I've realised since that there's a few places it didn't get
used 'cause I was using generalised controls that don't know about the
ZODB at all).
It's definitely something to be aware of when using ZODB outside of
Zope. Watch your pointers :) .
By now whatever weirdness was causing my particular problem with using
sync is probably gone, but I haven't really touched the app since I
delivered it a few months ago, so I don't know for sure.
Enjoy,
Mike
Jeff Sasmor wrote:
>I don't know why. I just found it didn't work as well. I didn't
>try to figure it out. I wanted to be sure that all object references
>were valid.
>
>Honestly, I went thru this about nine months ago and I don't
>recall all the details. Perhaps it has something to do with
>the fact that I am using wxPython and having ZODB objects
>as client data for things like list and tree controls.
>
>Mostly I just wanted to pass along my experience with using
>Undo outside of the Zope environment. Since Zope itself
>(unless I am greatly misunderstanding something) creates
>a new connection every time a page is rendered it seems
>as if the type of situation encountered when building an
>app where the db connection may be open for hours or
>days would not have come up. I am not familiar with
>other apps (aside from Zope) that support displaying
>the undoable transactions and letting a user click on one
>and undo it. Not to suggest that no one else has done it;
>I just am unaware of it.
>jeff
>
>#--------------------------------
>Jeff Sasmor
>jeff@sasmor.com
>----- Original Message -----
>From: "Magnus Lycka" <magnus@thinkware.se>
>To: "Jeff Sasmor" <jsasmor@gte.net>; <zodb-dev@zope.org>
>Sent: Sunday, November 03, 2002 8:23 AM
>Subject: Re: [ZODB-Dev] How to predict George Bailey?
>
>
>At 22:57 2002-11-02 -0500, Jeff Sasmor wrote:
>
>
>>I had built in methods to completely rebuild all windows, tree displays
>>etc., i.e. a 'Refresh' menu item. When an undo is performed, I just
>>rebuild everything (which includes an underlying ZODB disconnect
>>and reconnect).
>>
>>
>
>Why is disconnect/reconnect better than just sync?
>
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/