A lurkers ravings (was RE: Smalltalk beep -> XXX beep?) (anothertry)

goran.krampe at bluefish.se goran.krampe at bluefish.se
Wed May 14 13:17:55 UTC 2003


Hi Stephane!

Stephane Ducasse <ducasse at iam.unibe.ch> wrote:
> 
> We thought of that too. Any feedback on this one?

Why not simply add as a convenience method:

TranscriptStream>>beep
	"Make a default beep."

	Beeper beep

...or something like that? I do think I like to have the Beeper class -
since it would create a nice place to set what the default behaviour
should be, which sound if any etc.

But perhaps we should have a Singleton pattern here so that Beeper has a
single instance of itself that it uses. So essentially you would do:

Beeper default beep

...which would give the possibility of putting a completely different
Beeper instance in place - for example a silent one or one that writes
on stdout etc.

There could still be a convenience class side method like this though:

Beeper class>>beep

	self default beep


regards, Göran

PS. Sorry if I repeated stuff people already have written - I didn't
take the time to read the thread too closely.



More information about the Squeak-dev mailing list