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

Juan Vuletich juan at jvuletich.org
Thu Oct 15 16:26:33 PDT 2020

Hi Folks,

I just went forward with this. I moved RectangleLikeMorph, 
BorderedRectMorph, EllipseMorph, StringMorph, and UpdatingStringMorph to 
the new Morphic-Deprecated.pck.st package. I udated all the affected 
packages in the Cuis-Smalltalk GitHub organization. When possible, I 
fixed them making them reference the new classes. But for a few, heavy 
users of EllipseMorph, I added to them Morphic-Deprecated as a 
prerequisite. If your packages, I suggest a similar strategy.

Some of the updates interrupt the update process itself. Applying 
updates therefore requirese several restarts. This breaks the automatic 
tests run. For this reason, I also pushed updated images. Tests are 
green on GitHub now.


On 10/14/2020 10:47 AM, Hilaire Fernandes via Cuis-dev wrote:
> Hi Juan,
> The WidgetMorph hierarchy is a great idea. Newcomer with programming 
> background will be more comfortable to have two hierarchies: one for 
> more traditional GUI and another one for original and creative view.
> I agree with you StringMorph is a strange name, LabelMorph is more 
> aligned to the convention of the world of GUI, and it is a widely used 
> in GUI definition. The world Label is meaningful in many human 
> languages, this is another advantage aginst String, a low level term 
> in cs. Its unique added value is its name match the name of the 
> associated literal it displays on screen.
> If it is not too much trouble, I would vote for the name change.
> Hilaire
> Le 13/10/2020 à 16:43, Juan Vuletich a écrit :
>> In this way, all Widget morphs will be in the WidgetMorph hierarchy, 
>> improving consistency and making it easier to explain and remember.
>> - RectangleLikeMorph and BorderedRectMorph might get deleted. 
>> PasteUpMorph, HandMorph, HaloMorph, HaloHandleMorph and EllipseMorph 
>> could be subclasses of Morph. This will need some rework of their 
>> internals.
>> - Additionally, I want to rename StringMorph as LabelMorph, as 
>> 'label' is less ambiguous, and is how a read-only string widget is 
>> usually called.
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> https://pouet.chapril.org/@hilaire

Juan Vuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20201015/0f3f93fd/attachment.htm>

More information about the Cuis-dev mailing list