<div><div dir="auto">It sounds like it wants you to kill the Delay ( and Process? ) or something and create a new Delay on a replica of the Process ( or this same Process? ) But i am just guessing</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 18, 2019 at 22:50 Jim Rosenberg <<a href="mailto:jr@amanue.com">jr@amanue.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm in the midst of a project in which I'm adding sound to some artistic <br>
work I've been doing in Squeak for quite a few years now. I want a sound to <br>
be played when (1) the mouse cursor enters a morph which is one of my own <br>
subclasses of RectangleMorph; and then (2) the mouse cursor becomes <br>
"quiet". Maybe this is not the right way to do this, but here's how I'm <br>
thinking of doing it:<br>
<br>
On mouseEnter, create a Delay and then fork a process which waits on the <br>
Delay and plays the sound. (Duration of the Delay is an artistic decision <br>
based on context.)<br>
<br>
On mouseMove, if the Delay is notNil and is being waited on, "reset it".<br>
<br>
On mouseLeave, kill the process waiting on the Delay if it hasn't already <br>
fired.<br>
<br>
It looks to me from reading the code (Squeak 4.3) that I can reset the <br>
Delay using the Delay class method scheduleDelay: -- but [I haven't tried <br>
it yet ...] this makes me nervous. scheduleDelay: is labelled Private. I <br>
think that's telling me that calling this method from application code is a <br>
No-no. I'm also nervous about what I might need to do regarding the <br>
semaphore.<br>
<br>
Comments please? Is there an easier way to do this? I need some way to <br>
reset a Delay that's already being waited on to the original duration.<br>
<br>
-Thanks in advance, Jim<br>
<br>
</blockquote></div></div>