[Seaside] Question about Section 12.2 of the Seaside book
efinley.lists at gmail.com
Sat Oct 23 01:02:31 UTC 2010
On Fri, Oct 22, 2010 at 6:37 PM, John McKeon <p3anoman at gmail.com> wrote:
> On Fri, Oct 22, 2010 at 8:31 PM, Elliot Finley <efinley.lists at gmail.com>wrote:
>> This means the editor needs to operate on a copy of the object.
> 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...
>> This is how I did it. I'm a Smalltalk beginner, so there is probably a
much better way.
editor := ContactView new.
self editContact: self contacts first.
editor onAnswer: [ :answer | answer ifTrue: [ self save ] ifFalse: [ self
cancel ] ]
contactCurrentlyBeingEdited := aContact.
editor contact: aContact copy.
Contact removeContact: contactCurrentlyBeingEdited; addContact: editor
self editContact: contactCurrentlyBeingEdited.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside