MorphSlot extension for duplicate?

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

MorphSlot extension for duplicate?

Stephan Eggermont-3
If a morph holds onto another morph in an instVar,
it often shouldn't be copied when doing a duplicate.
Is that something that a MorphSlot variant could support?

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: MorphSlot extension for duplicate?

Marcus Denker-4
Hi,

The method doing the copying could take into account the type of variable used and not recurse it when copying.
In addition, with first class variables one could attach meta data for object copying and have some
annotation “skip this when duplicating”.

        Marcus

> On 02 Oct 2015, at 11:26, Stephan Eggermont <[hidden email]> wrote:
>
> If a morph holds onto another morph in an instVar,
> it often shouldn't be copied when doing a duplicate.
> Is that something that a MorphSlot variant could support?
>
> Stephan
>
>


Reply | Threaded
Open this post in threaded view
|

Re: MorphSlot extension for duplicate?

stepharo
In reply to this post by Stephan Eggermont-3
Pay attention that the more magic you use the more difficult to
understand the system will be.
For me duplicate should call copy and we should be able to see that copy
does not copy the instVar.


Le 2/10/15 11:26, Stephan Eggermont a écrit :
> If a morph holds onto another morph in an instVar,
> it often shouldn't be copied when doing a duplicate.
> Is that something that a MorphSlot variant could support?
>
> Stephan
>
>
>