SystemSpecifyer, was Re: [ZODB-Dev] How to predict George Bailey?

Toby Dickenson tdickenson@geminidataloggers.com
Thu, 7 Nov 2002 12:01:42 +0000


On Wednesday 06 November 2002 9:29 pm, Christian Reis wrote:
> On Sun, Nov 03, 2002 at 08:16:13PM +0000, Toby Dickenson wrote:
> > On Sunday 03 November 2002 6:36 pm, Magnus Lycka wrote:
> > > Let's pretend this is a word processor. Should I drop and
> > > reload my document every time I press Ctrl-S or Ctrl-Z?
> >
> > If this word processor is implemented using a M/V/C model, then it wo=
uld
> > be natural for the View to store its own state using its own view-dom=
ain
> > properties. It would not be natural for the view to store references =
to
> > objects in the Document.
> >
> > This means that the View is constantly acquiring references to docume=
nt
> > objects, but then dropping them.
>
> Does this mean a sort of "syncing"; loading state from the document
> object and storing it internally?

To some extent, yes.=20

If the view is only showing a part of the document, then the view object=20
definitely stores its own copy of the state which specifies the location=20
within the document.

During the detailed editing it possibly copies the state from the documen=
t=20
into GUI widgets. Some other editing processes are the moral equivalent o=
f=20
this - for example a drag-drop operation may be handled by the view objec=
t=20
itself, so it needs to store its own copy of what has been dragged.

When the detailed eding is complete, for example on the 'drop' event, the=
=20
state changes are written to the document (using the documents state chan=
ging=20
methods) and the view's internal copy discarded.