Bug? WindowsVM or other problem?

Andreas Raab Andreas.Raab at gmx.de
Tue Feb 5 22:22:29 UTC 2002


Jimmie,

That's an interesting problem. On Windows, #beep is asynchronous,
meaning that you're starting the same sound at (almost) exactly the same
time which is why you don't hear them separately. You could check what
the following does on the Mac vs. Windows:

	[10 timesRepeat:[Smalltalk beep]] timeToRun.

On my machine (XP) it returns after 10 milliseconds. BTW, there's a good
reason for this behavior - you can have any "beep" sound you want and so
waiting for the beep to be played would waste a lot of time during which
we could do a lot of useful processing. The following, however, should
work no matter where you are:

	10 timesRepeat:[
		Smalltalk beep.
		(Delay forSeconds: 1) wait.
	].

Since it will wait for a second inbetween the beeps you will hear them
all (it's just gonna take ten seconds ;-)

Cheers,
  - Andreas


> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Jimmie Houchin
> Sent: Tuesday, February 05, 2002 11:04 PM
> To: squeak-dev
> Subject: Bug? WindowsVM or other problem?
> 
> 
> I am going thru Mark's OODwMA book. :)
> 
> While at work in a workspace I type and doit.
> 
> 10 timesRepeat: [Smalltalk beep].
> 
> It only beeps once.
> At home on an iMac it correctly beeps 10 times.
> 
> Now at work
> 10 timesRepeat: [Transcript show: 'abc'].
> works correctly.
> 
> Is my hardware or Squeak too slow for these events.
> PII 266, 64mb ram, WindowsME
> 
> Just curious.
> 
> Thanks,
> 
> Jimmie Houchin
> 
> 





More information about the Squeak-dev mailing list