[Seaside] Newbie question Seaside book.

Julian Fitzell julian at fitzell.ca
Mon May 10 23:22:50 UTC 2010


But removing and adding a copy is not ideal because other places (other
pages in the session even) might be still holding onto the original version.
Object identity is pretty important in an object system.

Certainly making a copy to edit is a fairly common pattern but anytime I've
done it, we would copy the modified values back to the original on save (or
use a read-through proxy instead).

Julian

On Mon, May 10, 2010 at 2:00 PM, Sean Allen <sean at monkeysnatchbanana.com>wrote:

> >From looking at the code, I'm not sure how you would lose a reference to
> the ordered collection of contacts. Is it a class  variable or
> instance variable?
>
>
> 2010/5/10 José Perez <asertus at gmail.com>:
> > Basically in the initial (chapter 11) shows how to build a list of
> > contacts, and edit them, in a different page 1 by 1. Then it shows how
> > to handle the answer, if the user presses "save" or "cancel".
> >
> > What it does is editing a "copy" of the contact, and if the user
> > presses "save", then the copy replaces the original contact. If
> > "cancel" does nothing.
> >
> > In chapter 12 it shows how to "embed" an editor under the list.
> > Editing the contact in the same page.., and it works..., but editing
> > the "actual" contact. So, if you press save or cancel, the contact is
> > always updated...
> >
> > There it is where I tried to implement the same "behavior" for the
> > "cancel" button...
> >
> > Regards...
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100511/a73c306a/attachment.htm


More information about the seaside mailing list