<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 8/4/2024 5:13 PM, Mark Volkmann via Cuis-dev wrote:
<blockquote
cite="mid:CAFfRWnXEVpoYDgCHxUikjpM-pWciXj5nXGcdpJk4bz702B-__w@mail.gmail.com"
type="cite">
<div dir="ltr">When I run the code in the debugger I see this in
the class method "new" of <font face="monospace">LayoutMorph</font>:
<div><br>
</div>
<div><font face="monospace">new<br>
^self newRow color: `(Color red alpha: 0.2)`</font><br>
</div>
<div><br>
</div>
<div>So that explains why the color is a shade of pink. It sends
the message `#color:` to the instance AFTER sending the
message `#newRow`.</div>
<div>The `newRow` method calls `initialize` which I override to
also send the message `#color` with my preferred color.</div>
<div>So my color gets replaced by pink due to the order of the
calls.</div>
</div>
</blockquote>
<br>
Yes. Not helpful, and annoying. Just pushed an update to remove
that.<br>
<br>
<blockquote
cite="mid:CAFfRWnXEVpoYDgCHxUikjpM-pWciXj5nXGcdpJk4bz702B-__w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Now I need to find a place other than `initialize` to set
the color AFTER `new` is called.</div>
<div>I suppose one option is to override the `drawOn:` method
like this:</div>
<div><br>
</div>
<div><font face="monospace">drawOn: aCanvas<br>
self color: Color green.<br>
super drawOn: aCanvas.</font><br>
</div>
<div><br>
</div>
<div>Is that what you recommend?</div>
</div>
</blockquote>
<br>
No, just use the update I just pushed.<br>
<br>
Thanks,<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>