5. Re: Issue 11 and Issue 12. Using #deepCopy, I have trouble understanding (Ladislav Lenart)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

5. Re: Issue 11 and Issue 12. Using #deepCopy, I have trouble understanding (Ladislav Lenart)

Intrader Intrader
#deepCopy not necessary here - a copy sufices.
My problme was that I incorrectly used ifFalse instead of iTrue.

<code that works>
editContact: aContact
     | copy |
     copy := aContact copy.
     (editor contact: copy) onAnswer: [ :answer |
         "copy has been updated - keep update if Save"
         answer ifTrue: [MyContact removeContact: aContact; addContact:
copy.
             ]
]
</code that works>
According to Ladislav:
 >
 > You want to swap the contacts only when the user clicked on a Save
button.
 > Otherwise there's nothing that needs to be done. However be aware that
 > I am not a Seaside user.
 >
 >


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: 5. Re: Issue 11 and Issue 12. Using #deepCopy, I have trouble understanding (Ladislav Lenart)

Ladislav Lenart
Hello.

I am glad it works.

Just out of curiosity: Does it (your web page generally
and the contact editing feature in particular) also work
correctly in combination with a browser's Back button?


Ladislav Lenart


On 5.5.2011 23:19, intrader wrote:

> #deepCopy not necessary here - a copy sufices.
> My problme was that I incorrectly used ifFalse instead of iTrue.
>
> <code that works>
> editContact: aContact
>       | copy |
>       copy := aContact copy.
>       (editor contact: copy) onAnswer: [ :answer |
>           "copy has been updated - keep update if Save"
>           answer ifTrue: [MyContact removeContact: aContact; addContact:
> copy.
>               ]
> ]
> </code that works>
> According to Ladislav:
>   >
>   >  You want to swap the contacts only when the user clicked on a Save
> button.
>   >  Otherwise there's nothing that needs to be done. However be aware that
>   >  I am not a Seaside user.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc