Beep new design
Richard A. O'Keefe
ok at cs.otago.ac.nz
Mon May 19 05:13:08 UTC 2003
Object subclass: #Beeper
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'System-Support'!
!Beeper commentStamp: 'sd 5/17/2003 13:04' prior: 0!
I'm a simple object been responsible to provide an audible feedback.
However, the feedback can be change by using my class side method
setDefault: with an object understanding the message play.
Can this be Englished? Perhaps
My job is to provide simple audible feedback.
The sound you get can be changed by using my class-side method
#setDefault: with an object that implements the #play message.
----------------------------------------------------------------
So you can invoke Beeper as follow
s/follow/follows:/
Beeper default beep
Beeper default play
But the idiom is really Beeper beep
Note that play is introduced to propose a common interface between
s/propose/provide/ ???
clearDefault
"Beeper clearDefault set as default the primitive beep"
Reads awkwardly.
We don't need to be told it's Beeper clearDefault, we can see that.
So
"Select the primitive beep as the default beep."
!Beeper class methodsFor: 'customize' stamp: 'sd 5/17/2003 12:11'!
setDefault: aPlayableEntity
"aBeepingEntity should anwers the message play"
s/anwers/answer/
s/play/#play/
beep
"The preferred way of producing a sonor feedback"
"sonor"????
s/a sonor/an audible/
More information about the Squeak-dev
mailing list
|