<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Bernhard,<br>
<br>
On 9/2/2024 5:01 PM, Bernhard Pieber via Cuis-dev wrote:
<blockquote
cite="mid:0B22EC2F-0A21-41B1-8599-62C8C01DE359@pieber.com"
type="cite">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Hi Juan, Hilaire,
<div><br>
</div>
<div>I think the root cause of this problem is that these concepts
are orthogonal. Maybe you want a morph that can be placed but
has no border or the other way around. Single inheritance is
just not good at expressing this. (This would be an ideal use
case for stateful traits IMO.) However, why not use composition
instead of inheritance? Instead of being a BoxedMorph any morph
could just have a box (with border, padding) if it needed one.
There might be other useful types of decorations for morphs,
e.g. labels or scrolling. (Being a subclass of PluggableMorph
every PluggableScrollPane has a model although it does not have
a use for it.)</div>
<div><br>
</div>
<div>Just my two cents…</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Bernhard</div>
</blockquote>
<br>
What you suggest will have its own set of advantages and challenges.
Fortunately, in Cuis, Morph class is pretty minimal, only stating
that Morphs are nested in the owner / submorphs tree. Anything else
is handled by subclasses. PlacedMorph only adds location and
optional LayoutSpec.<br>
<br>
So, here is my suggestion: Try it. Write new morphs, starting with
one (or several!) subclass(es) of Morph. Implement your decoration
strategy. You don't need to build any of the MorphicCanvas and
MorphicEngine stuff. Those are pretty general. Your new Morphs could
most likely live in the existing World. If not, you can write a new
World. Switching between your NewWorld and the existing World is
simply suspending / terminating the process for one UI and resuming
/ creating the process for the other. (You can easily have several
instances of WorldMorph today if you want).<br>
<br>
See where it leads. I'm sure it would be a wonderful learning
experience for all of us!<br>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>