<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
Wow, an actual answer.
</div>
<blockquote type="cite">
<div>
On 06/29/2024 8:23 PM EDT Vanessa Freudenberg via Cuis-dev <cuis-dev@lists.cuis.st> wrote:
</div>
<div>
</div>
<div>
</div>
<div dir="auto">
If you simply set the color instance variable, the morph is not redrawn. If you click the morph after, you will see that it is indeed blue.
</div>
<div dir="auto">
</div>
<div dir="auto">
The #color: method takes care of both setting the instance variable and invalidating the morph so it gets redrawn automatically.
</div>
<div dir="auto">
</div>
<div dir="auto">
Vanessa
</div>
<div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">
On Sat, Jun 29, 2024 at 16:45 Mark Volkmann via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:
</div>
<blockquote>
<div dir="ltr">
Can someone explain what's going on near the end of this sequence of basic steps?
<div>
</div>
<div>
- Open the World menu and select "New Morph...".
<br>- Select "Basic...Boxed Morph" or really any morph with a background fill color.
<br> An orange rectangle will appear, attached to the mouse cursor.
<br>- Move to where you want to place it and click to drop it.
</div>
<div>
- cmd-click (macOS) on the morph to open its halo.
<br>- Click the blue button on the top row.
<br>- Select "debug...inspect morph" to open an Inspect window
<br> for the object that represents that morph.
<br>- Click the `color` instance variable and note that the value is a `Color` object.
<br>- Click in the bottom pane.
</div>
<div>
- Enter `color := Color red` and "Do it".
</div>
<div>
- Note that the value of the instance variable in the upper-right pane updates to `Color red`,
</div>
<div>
BUT the fill color of the morph does not change.
<br>- Enter `self color: Color blue` and "Do it".
</div>
<div>
- Note that the value of the instance variable in the upper-right pane updates to `Color blue`,
<br> AND the fill color of the morph changes to blue.
<br>
<div>
</div>
<div>
Why does the first approach not update the morph, but the second approach does?
</div>
<div>
Both update the value of the instance variable inside the Inspect window.
</div>
</div>
</div>
<div dir="ltr">
<div>
<div>
</div> <span class="gmail_signature_prefix">-- </span>
<br>
<div class="gmail_signature" dir="ltr" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<span style="font-family: arial, helvetica, sans-serif; color: #000000;">R. Mark Volkmann</span>
</div>
<div>
<span style="font-size: 12.8px;"><span style="font-family: arial, helvetica, sans-serif; color: #000000;">Object Computing, Inc.</span></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> --
<br>Cuis-dev mailing list
<br><a href="mailto:Cuis-dev@lists.cuis.st" target="_blank" rel="noopener">Cuis-dev@lists.cuis.st</a>
<br><a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" target="_blank" rel="noopener">https://lists.cuis.st/mailman/listinfo/cuis-dev</a>
</blockquote>
</div>
</div> --
<br>Cuis-dev mailing list
<br>Cuis-dev@lists.cuis.st
<br>https://lists.cuis.st/mailman/listinfo/cuis-dev
</blockquote>
</body>
</html>