[Cuis-dev] [RFC][Proposal] A possible refactor of the Morph hierarchy

Luciano Notarfrancesco luchiano at gmail.com
Wed Oct 14 05:17:54 PDT 2020

Hm... so far I think every morph class has been suffixed by ‘Morph’, seems
like a good convention for Morphic and it feels weird to break it and start
calling things *Widget. I’d call it just LabelMorph, because suffixing with
‘WidgetMorph’ seems excessive.

On Wed, 14 Oct 2020 at 6:58 PM, Hernan Wilkinson via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hi Juan,
>  I like the idea, I also have problems understanding those classes and the
> names are not good as you say.
>  Regarding StringMorph renamed to LabelMorph, shouldn't it be LabelWidget?
> or will it be a subclass of Morph? ... if it will be a subclass of
> WidgetMorph, I would call it LabelMorph or LabelWidget.
>  Regarding the migration, I think we have to find a way for all the
> current packages to be aware of these changes...  It would be great to have
> all the affected packages loaded so when renaming the classes that would
> rename all its references in packages and then you could provide the
> changes of them... do you see that possible? (of course that what it means
> all packages has to be decided). If not, we need to look for a way to
> facilitate the migration.
>  Cheers!
>  Hernan.
> On Tue, Oct 13, 2020 at 5:22 PM Juan Vuletich <juan at jvuletich.org> wrote:
>> On 10/13/2020 2:44 PM, Phil B via Cuis-dev wrote:
>> > Juan,
>> >
>> > Not wild about the StringMorph->LabelMorph idea... looks like
>> > rearranging the lawn furniture to me as the existing name seems
>> > accurate and clear.
>> Ok. Let's listen to other opinions. Leaving it like it is is also ok for
>> me.
>> > Re: the rest, hopefully the final step would be to merge
>> > RectangleLikeMorph and BorderedRect back into RectangleMorph and move
>> > it to someplace like goodies.
>> I think we can do better than that. RectangleLikeMorph and BorderedRect
>> can't be rotated, for instance. We'd include a basic library of vector
>> graphics shapes to play with. We're slowly walking in that direction.
>> > The first question new users often have re: Morphic is 'how do I
>> > instantiate or create my own Morph?' and a clean RectangleMorph would
>> > provide that as a trivial Morph for instantiating and subclassing.
>> > (i.e. rather than deprecating it and prolonging the confusion/pain,
>> > keep a cleaned up version around specifically for tutorials/testing
>> > where you don't have to worry about features creeping in over the
>> > years breaking things)
>> I agree with the concern, but I don't like RectangleMorph or
>> BorderedRectMorph for that. Squeak has a pretty nice set of morphs to
>> play with. Cuis doesn't include them because they look ugly without a
>> good vector engine, and because the implementation of scaling and
>> rotation is not good enough. VectorGraphics allows to do all that and
>> more, with nicer code and better looks.
>> > Also, make sure the widget class is explicitly documented as abstract
>> > just like Morph should be (how many times have we had people confused
>> > about why instantiating Morph has problems?)
>> But Morph, RectangleMorph and BorderedRectMorph, all can be instantiated
>> and used. If something breaks, please tell.
>> >
>> > Thanks,
>> > Phil
>> >
>> Thanks,
>> --
>> Juan Vuletich
>> www.cuis-smalltalk.org
>> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
>> https://github.com/jvuletich
>> https://www.linkedin.com/in/juan-vuletich-75611b3
>> @JuanVuletich
> --
> *Hernán WilkinsonAgile Software Development, Teaching & Coaching*
> *Phone: +54-011*-4893-2057
> *Twitter: @HernanWilkinson*
> *site: http://www.10Pines.com <http://www.10pines.com/>*
> Address: Alem 896, Floor 6, Buenos Aires, Argentina
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20201014/bd52c01a/attachment.htm>

More information about the Cuis-dev mailing list