Smalltalk beep -> XXX beep?

Russell Penney russell.penney at tincanct.com
Wed May 14 07:53:47 UTC 2003


Excellent! I like this even better. It means that you can have 'Beeper
beep' and maybe further down the track 'Beeper woohoo' or 'Beeper
youBrokeSomething'

Plus I can change the default sound to something even cooler when I want
to easily and in one place.

Russell

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Stephane Ducasse
> Sent: Wednesday, 14 May 2003 5:26 PM
> To: The general-purpose Squeak developers list
> Subject: Re: Smalltalk beep -> XXX beep?
> 
> 
> Ok I will propose a new design soon and I want to have your 
> comment on 
> that.
> The idea is to have
> 
> 	Beeper beep
> 		calling the primitive if no Sound is available
> 
> 	Beeper beep
> 		calling the cool sound when the sound system is 
> available
> 
> SampleSound>>initialize
> 	could do
> 
> 	Beeper setDefault: self beepSound
> 
> Stef
> 
> On Wednesday, May 14, 2003, at 03:20 AM, Andreas Raab wrote:
> 
> > Hi Stef,
> >
> > [#beep in SampledSound]
> >> I defined beep on SampledSound to avoid to have hardcoded 
> reference 
> >> and a class referring to its subclasses.
> >
> > While you are correct in general, I think that this solution is not
> > the best
> > one in practice. What you're doing here is requiring 
> SampledSound to be
> > present in order to beep while one can very well argue that this 
> > should be
> > handled by FMSound or similar. So any one of the concrete 
> subclasses 
> > could
> > take on the responsibilities for knowing how to beep.
> >
> > Considering this, I would claim that the "right" way of solving this
> > problem
> > is to have a (probably class) variable which stores the 
> sound to use. 
> > So
> > that one could use arbitrary sounds as the 'default beep sound'.
> >
> > Cheers,
> >   - Andreas
> >
> >
> >
> 
> 
> 




More information about the Squeak-dev mailing list