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

Bert Freudenberg bert at freudenbergs.de
Fri Apr 1 16:45:19 UTC 2016


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.

> 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.

> 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).

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 -
>> 
>> 
>> 
>> 




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4207 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160401/c1acea2d/smime-0001.bin


More information about the Squeak-dev mailing list