[squeak-dev] [Help] How do you work deep copier? (Solved)
peace_the_dreamer at yahoo.com
Sun Apr 25 17:42:26 UTC 2010
[squeak-dev] [Help] How do you work deep copier?
Thanks for your reply.
I tried following #veryDeepInner: and #veryDeepFixupWith: .
That's where I found the horror.
Deep copier has to make itself aware of every exception in the world.
I went back to proding and poking my examples. Found eventhandler not coping its ivars except passively. So the work around turned out to be:
Give the morph an #alsoDuplicate property and list my travel agent there. Then when the morph was copied I got a new instance of travel agent w/o having to change eventhandlers behavior or even understanding why it has the copy passively policy.
Yours in curiosity and service, --Jerome Peace
>Stéphane Rollandin lecteur at zogotounga.net
>Sun Apr 25 08:33:41 UTC 2010
>> I tried looking into it further but deep copy is a horror.
>#veryDeepInner: and #veryDeepFixupWith: are the key methods driving the
>fine behavior of a very deep copy (what is shared, deep copied or very
>There are many implementors of those. By studying them you should see
>how the copy mechanism work. You can then decide how to copy or share
>the inst vars you wants.
More information about the Squeak-dev