Bug? WindowsVM or other problem?
Tim Rowledge
tim at sumeru.stanford.edu
Tue Feb 5 22:22:41 UTC 2002
Jimmie Houchin <jhouchin at texoma.net> is claimed by the authorities to have written:
> 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
Nope - it's one of those things where the OS has an effect. 'beep' is
done via a primitive that is going t be subtly different on each OS. On
MacOS it is evidently a synchronous call, whereas it seems that on 'doze
it is asynchronous - ie the prim returns virtually immediately and gets
called again almost immediately after that.
Change it to:-
10 timesRepeat:[ Smalltalk beep. (Delay forSeconds:1) wait]
and it will almost certainly do what you expect.
Trying
10000000 timeRepeat: [ Smalltalk beep]
might also be interesting. My guess is that it will make a very long
beeping noise rather than a lot of beeps. Let us know...
tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
"Bother," said Pooh, as Simon stole his Jet calender.
More information about the Squeak-dev
mailing list
|