[squeak-dev] The Inbox: Graphics-cmm.329.mcz

Eliot Miranda eliot.miranda at gmail.com
Sat Apr 2 16:10:11 UTC 2016


Hi All,

> On Apr 1, 2016, at 9:45 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> 
>> On 01.04.2016, at 16:53, Chris Muller <asqueaker at gmail.com> wrote:
>> 
>> Really?  That's really surprising; SketchMorph is just a dumb data
>> object, a painting, making a copy of it via the UI is a valid
>> use-case.  For every other kind of Morph, the green halo makes a deep
>> copy.
> 
> Every other morph is cheap to copy, compared to deep-copying bitmaps.

That makes sense.

>> SketchMorph is inconsistent, shouldn't Etoys simply override
>> that halo to call its own #semiDeepCopy to suit its own purposes?
>> 
>> Is Etoys running in trunk?
> 
> Yes it is. There are even a few people using it (e.g. https://realm.io/news/altconf-daniel-steinberg-swift-playgrounds-education/ ). 
> 
>> It is not targeted for trunk though, is it?
> 
> It’s still desirable to retire the Etoys fork of Squeak. Having a unified codebase (and faster VM) would be very nice. We may finally have found students to work on that, but even if it does not happen soon it’s still the plan.

+1

>> I want to be able to make easy copies of SketchMorph's.  Surely we can
>> come up with some solution; what about Karl's suggestion?   I think
>> Shift should be the sharing, because the "modifer" keys are used to
>> "modify" the standard behavior, which is a true veryDeepCopy..
> 
> Why not adhere to the copy-on-write scheme for forms in Morphic? That’s how it was designed. 
> 
> E.g. when you make a green-handle copy of a SystemWindow, why would you want to deep-copy all the icons? 
> 
> Instead, before you modify a form (which is an extremely rare operation compared to all uses of forms), make a copy of it. That is how all the Sketch editing functions work (e.g. in the halo’s “painting…” submenu).

+1.  But it needs to be documented in all the relevant Morph veryDeepCopy methods, not just SketchMorph but Morph too (& possibly in the class comments?).

I suspect that too often we write simple schemes like this that over time get obscured by layers of new code (I see uniclass support in morph VDC methods) and even if the original intent was clear in the first version, in these later versions it is difficult to see.  Conventions like this /must/ be well-documented to thrive.

> Btw you may consider using an ImageMorph if you don’t actually need all the specialized SketchMorph functionality. It does share the form when deep-copying too, though.
> 
> - Bert -
> 
>> 
>> 
>>> On Fri, Apr 1, 2016 at 8:45 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>>>> On 01.04.2016, at 01:41, Chris Muller <asqueaker at gmail.com> wrote:
>>>> 
>>>> Okay, that's why this is in the Inbox.  I started to formulate my
>>>> question in long words in email, but decided this was the quickest and
>>>> easiest way to ask it.  :)
>>>> 
>>>> Okay, so this is definitely not the place to fix my problem.  So I
>>>> will instead try putting something into SketchMorph's veryDeepFixup:
>>>> which will ensure its underlying form gets copied when I green-halo a
>>>> SketchMorph.  SketchMorph is an exception because he's a dumb data
>>>> object, not a "player" who wants to share a costume.
>>> 
>>> SketchMorph is the single most-used user object in Etoys :)
>>> 
>>>> -- I was working on an icon, writing scripts to change colors
>>>> pixel-by-pixel, goofed up my "backup" SketchMorph I had torn off the
>>>> green halo, only to find I corrupted my original, as well.  Some work
>>>> lost.
>>> 
>>> I’m sorry you lost time. Nevertheless, the originalForm in SketchMorph is designed to be shared.
>>> 
>>> - Bert -
> 
> 
> 
> 


More information about the Squeak-dev mailing list