<!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">
If your classes are models of a Morphic GUI, the style I prefer is
to have the main morph receive the stepping, and call the model.<br>
<br>
Using threads is trickier, because you'd need to protect state that
is accessed from more than one thread. Morphic stepping is simpler
to use, and often it is enough.<br>
<br>
On 3/27/2023 9:51 AM, Alexandre Rousseau via Cuis-dev wrote:
<blockquote
cite="mid:CAKmOayK2dqLnqkOQ6HLg1kMO1BGGNrMPn1AFoScFLG049-8DcQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Thanks! I feel though that threads could be overkill for my
needs (I'm probably biased as an Elixir -- light processes etc
-- dev) ?</div>
<div><br>
</div>
<div>- I have a TrafficLightFSM (cycling through, say, #red
#green #yellow states).</div>
<div>- This fsm aka model is observed by a TrafficLightMorph, a
WalkPrompterMorph, a CountdownMorph, and others.<br>
</div>
<div>- I would like to keep the timing of transitions from one
state to the next inside the model.</div>
<div><br>
</div>
<div>Creating/finding a TimerMorph acting as controller of my
model could work, but I was wondering if there was a canonical
way for such needs.</div>
<div><br>
</div>
<div>ps: gotta love Smalltalk ... so pleasant + easy to work
with (and to shoot oneself in the foot :) .</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Mar 27, 2023 at
7:44 AM Hernán Wilkinson <<a moz-do-not-send="true"
href="mailto:hernan.wilkinson@10pines.com">hernan.wilkinson@10pines.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div dir="ltr">Those messages are part of the Morph framework.
<div>They do not work on regular objects, I do not know why
they are defined in Object, perhaps a legacy reason.</div>
<div>If you want to send messages at regular intervals,
create a thread to do it using the message #fork or
similar (look at BlockClosure class)</div>
<div><br>
</div>
<div>Cheers</div>
<div>Hernan.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Mar 27, 2023 at
12:18 AM Alexandre Rousseau via Cuis-dev <<a
moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div dir="ltr">I'd like my Object's subclass instances to
send messages at regular intervals.
<div><br>
</div>
<div>I see that Object defines the #wantsSteps and
#stepAt: selectors, but I can't find examples of
usage.
<div><br>
</div>
<div>Does anyone have anything on this?</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
</div>
</div>
-- <br>
Cuis-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a moz-do-not-send="true"
href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span>-- </span><br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div style="font-size: small;">
<div dir="ltr">
<div dir="ltr">
<div style="font-size: 12.8px;"><span
style="font-family: tahoma,sans-serif;
font-size: xx-small; border-collapse:
collapse;"><strong><span style="font-size:
8pt;"><span style="font-size: small;"><font
size="2"><span style="font-weight:
normal;"><span style="font-weight:
bold;">Hernán Wilkinson</span><br>
Agile Software Development,
Teaching & Coaching</span></font></span></span></strong></span></div>
<div style="font-size: 12.8px;"><span
style="font-family: tahoma,sans-serif;
font-size: xx-small; border-collapse:
collapse;"><strong><span style="font-size:
8pt;"><span style="font-size: small;"><font
size="2"><span style="font-weight:
normal;">Phone: +54-011</span></font></span></span></strong></span><font
size="2" face="tahoma, sans-serif">-4893-2057</font></div>
<div style="font-size: 12.8px;"><strong
style="font-family: tahoma,sans-serif;
font-size: xx-small;"><span
style="font-size: 8pt;"><span
style="font-size: small;"><font size="2"><span
style="font-weight: normal;">Twitter:
@HernanWilkinson</span></font></span></span></strong></div>
<div style="font-size: 12.8px;"><span
style="font-family: tahoma,sans-serif;
font-size: xx-small; border-collapse:
collapse;"><strong><span style="font-size:
8pt;"><span style="font-size: small;"><font
size="2"><span style="font-weight:
normal;">site: <a
moz-do-not-send="true"
href="http://www.10pines.com/"
style="color: rgb(17, 65, 112);"
target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div>
<div style="font-size: 12.8px;"><font
face="tahoma, sans-serif"><span
style="border-collapse: collapse;">Address:
Alem 896</span></font>, Floor 6, Buenos
Aires, Argentina</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
<br>
<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>