Wow I stand corrected. I had no idea you could answer: from a component that hadn&#39;t been called. You learn something new every day.<div>Back to reading....</div><div><br><div class="gmail_quote">On Fri, Oct 22, 2010 at 9:02 PM, Elliot Finley <span dir="ltr">&lt;<a href="mailto:efinley.lists@gmail.com">efinley.lists@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><div>On Fri, Oct 22, 2010 at 6:37 PM, John McKeon <span dir="ltr">&lt;<a href="mailto:p3anoman@gmail.com" target="_blank">p3anoman@gmail.com</a>&gt;</span> wrote:</div>
</div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div>On Fri, Oct 22, 2010 at 8:31 PM, Elliot Finley <span dir="ltr">&lt;<a href="mailto:efinley.lists@gmail.com" target="_blank">efinley.lists@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This means the editor needs to operate on a copy of the object.<br></blockquote><div><br></div></div><div>Yes, and the only place you can put code to deal with the copy is in the button callbacks. In this configuration though, answer: is of no use. You would need to do something else...  </div>

<div><div></div><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="gmail_quote"><br></div></blockquote></div></div></div></blockquote></div><div>This is how I did it.  I&#39;m a Smalltalk beginner, so there is probably a much better way.</div>

<div> </div><div> IAddress&gt;&gt;initialize</div><div><span style="white-space:pre-wrap">        </span>super initialize.</div><div><span style="white-space:pre-wrap">        </span>editor := ContactView new.</div>
<div><span style="white-space:pre-wrap">        </span>self editContact: self contacts first.</div><div><span style="white-space:pre-wrap">        </span>editor onAnswer: [ :answer | answer ifTrue: [ self save ] ifFalse: [ self cancel ] ]</div>

<div><br></div><div><div>IAddress&gt;&gt;editContact: aContact</div><div><span style="white-space:pre-wrap">        </span>contactCurrentlyBeingEdited := aContact.</div><div><span style="white-space:pre-wrap">        </span>editor contact: aContact copy.</div>

</div><div><br></div><div><div>IAddress&gt;&gt;save</div><div><span style="white-space:pre-wrap">        </span>Contact removeContact: contactCurrentlyBeingEdited; addContact: editor contact</div></div><div>
<br></div><div><div>IAddress&gt;&gt;cancel</div><div><span style="white-space:pre-wrap">        </span>self editContact: contactCurrentlyBeingEdited.</div></div><div><br></div></div>
<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>
<br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://john-mckeon.us" target="_blank">http://john-mckeon.us</a><br>
</div>