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.<br><br>Certainly making a copy to edit is a fairly common pattern but anytime I&#39;ve done it, we would copy the modified values back to the original on save (or use a read-through proxy instead).<br>

<br>Julian<br><br><div class="gmail_quote">On Mon, May 10, 2010 at 2:00 PM, Sean Allen <span dir="ltr">&lt;<a href="mailto:sean@monkeysnatchbanana.com">sean@monkeysnatchbanana.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

&gt;From looking at the code, I&#39;m not sure how you would lose a reference to<br>
the ordered collection of contacts. Is it a class  variable or<br>
instance variable?<br>
<div class="im"><br>
<br>
2010/5/10 José Perez &lt;<a href="mailto:asertus@gmail.com">asertus@gmail.com</a>&gt;:<br>
</div><div><div></div><div class="h5">&gt; Basically in the initial (chapter 11) shows how to build a list of<br>
&gt; contacts, and edit them, in a different page 1 by 1. Then it shows how<br>
&gt; to handle the answer, if the user presses &quot;save&quot; or &quot;cancel&quot;.<br>
&gt;<br>
&gt; What it does is editing a &quot;copy&quot; of the contact, and if the user<br>
&gt; presses &quot;save&quot;, then the copy replaces the original contact. If<br>
&gt; &quot;cancel&quot; does nothing.<br>
&gt;<br>
&gt; In chapter 12 it shows how to &quot;embed&quot; an editor under the list.<br>
&gt; Editing the contact in the same page.., and it works..., but editing<br>
&gt; the &quot;actual&quot; contact. So, if you press save or cancel, the contact is<br>
&gt; always updated...<br>
&gt;<br>
&gt; There it is where I tried to implement the same &quot;behavior&quot; for the<br>
&gt; &quot;cancel&quot; button...<br>
&gt;<br>
&gt; Regards...<br>
&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
&gt; <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
&gt;<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div></div></blockquote></div><br>