[squeak-dev] Making morphs scriptable

Bert Freudenberg bert at freudenbergs.de
Sun Sep 21 08:28:59 UTC 2008


Am 21.09.2008 um 03:51 schrieb Robert Hawley:

> Hi Bert
>
> I wrote a timesRepeatMorph and put it on SqueakMap but have found  
> the one in OLPC etoys and that is better.

Hehe - kudos to Scott :) But he also went through several iterations,  
see below.

>  Is there progress on the repository you mentioned before?

Not that I know of - Michael would be the person to talk to about the  
details going forward.

>  Is there any problem with lifting the code for the OLPC timesRepeat  
> and putting it into SqueakMap so that it can be imported to Squeak  
> Morphic?  (It would be good to have it there, but I don't want to  
> tread on someone else's toes unnecessarily).

No, on the contrary, we'd love for the Etoys changes to be merged back  
into mainstream Squeak (and vice versa), but sadly there never seems  
to be enough time for doing that.

Anyway, all the Etoys change-sets are mirrored here:

http://etoys.laptop.org/src/changesets/

and looking at the full ChangeLogs at

http://etoys.laptop.org/src/

indicates these to be relevant for times-repeat:

=== 1146timesRepeat-sw.cs ===
Change Set:             timesRepeat-sw
Date:                   20 December 2006
Author:                 Scott Wallace

Adds a 'Repeat' tile to etoys.

Caution:  All the indicated repetitions of the code in the Do section  
are run atomically when the Repeat complex is run.   I
t is tantalizing to contemplate an implementation in which the  
repetitions are distributed across successive ticks of a tick
ing script, but that is not what we have here.

NB There are still some glitches to be ironed out -- see below -- but  
the feature is usable.

Obtain a Repeat...Times tile from either of two places:
   -- a Scriptor's menu
   -- the 'miscellaneous' category in a Viewer

Still faulty:
   --  Drop-zone-highlight [green] feedback often not properly offered  
in the TIMES areas.
   --  Extension arrow is presented but nothing actually happens when  
you click on it yet.

=== 1381timesCarets-sw.cs ===
Change Set:             timesCarets-sw
Date:                   15 June 2007
Author:                 Scott Wallace

Makes the 'times' part of the Times-Repeat unit conducive to suffix  
arrow and re
tract-arrow use.

Because of the significant structure change, the new times-repeat tile  
is embodi
ed in a new classs, TimesRepeatTile, as a replacement fot  
TimesRepeatMorph.  For
  the moment at least we leave the latter in place, unchanged, for  
backward compa
tibility, though this may turn out not to have been entirely wise.

=== 1385timesRepeatFixes-sw.cs ===
Change Set:             timesRepeatFixes-sw
Date:                   23 June 2007
Author:                 Scott Wallace

Avoid error when generating code for empty-Times-area case.
Avoid error when Times area evaluates to non-integer.
Note:  The obsolete TimesRepeatMorph also has its code-generating code  
fixed her
e.

=== 2005timesRepeatFixes-sw.cs ===
Change Set:             timesRepeatFixes-sw
Date:                   28 May 2008
Author:                 Scott Wallace, Karl Ramberg

TRAC 7044:       TimesRepeat tile is not translated.

This update makes the Times, Repeat, and Do labels on Times/Repeat  
tiles translatable, but it will take a while for actual t
ranslations to catch up...

Also fixes a bug that resulted in an unwanted pale green spacer on the  
Times tile, as well as a bug that resulted in the tem
porary positioning of the extension arrow before the 2 on a nascent  
times tile (rather than after the 2, as expected) ... th
anks to Karl for both of those fixes.


- Bert -

>
> Yours
>
> Bob
> (Robert Hawley)
> ________________________________________
> From: Bert Freudenberg [bert at freudenbergs.de]
> Sent: 10 July 2008 10:54
> To: Robert Hawley
> Cc: The general-purpose Squeak developers list
> Subject: Re: [squeak-dev] Making morphs scriptable
>
> Am 10.07.2008 um 07:25 schrieb Robert Hawley:
>
>> There is an eToys scriptable DiceMorph and an eToys scriptable
>> CalculatorMorph on SqueakMap. I'd welcome comments or bug reports.
>>
>> The calculator can be driven entirely from scripts, which makes it
>> quite fun and potentially interesting for schools.
>>
>> The DiceMorph is a reasonably simple example of how to make a morph
>> scriptable.
>>
>> I am surprised there aren't more eToys scriptable morphic objects
>> available. Is there a coherent repository that I have yet to  
>> discover?
>
> No - the Etoys community is even less organized than the Squeak
> community in general ;)
>
> Current Etoys discussion takes place at
>
>        http://lists.laptop.org/listinfo/etoys
>
> We plan to switch to a community-driven development style so now is
> the perfect time to join the efforts. A public repository for
> contributions will be one of the first steps.
>
> - Bert -
>
>




More information about the Squeak-dev mailing list