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

Hernan Wilkinson hernan.wilkinson at gmail.com
Wed Oct 14 04:58:04 PDT 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20201014/3dcb1a88/attachment-0001.htm>


More information about the Cuis-dev mailing list