Notes |
|
(0013675)
|
wiz
|
04-09-10 00:48
|
|
Try:
"SampledSound soundNames atRandom sound play"
" 'oops' sound play " (plays Beeper beep)
Yours in curiosity and service, --Jerome Peace |
|
|
(0013679)
|
wiz
|
04-09-10 21:00
|
|
SoundSupportTests.st
adds simple test for the existance of the String>>#sound selector
and the return of a playable object. |
|
|
(0013695)
|
laza
|
04-13-10 12:19
|
|
I changed this to feature, because there is no bug to fix as far as I can tell.
Also I guess you will need to mobilize more supporters for your idea on squeak-dev to make this happen. |
|
|
(0013696)
|
laza
|
04-13-10 12:23
|
|
Just to say, that I wouldn't like the String class to be "polluted" with such "convenience" methods. There would be no end ...
String image
String morph
String fileContent
... |
|
|
(0013708)
|
wiz
|
04-14-10 00:50
|
|
Hi laza,
Each to his own opinion.
My take is that in squeak everything is an object. This means that basic classes such as number and string serve as objects. It leads to the following problem:
The number or name of something acts as a modifier, yet if you use the number or name first in squeak it is a receiver. To have a worthwhile language which resembles my speaking language I choose to allow my modifiers to be receivers.
It is stupid IMO to invent classes inorder to use modifiers as argument parameters. In squeak modifiers sometimes belong in the position of receivers.
In this case the problem is the invented and arbitrary class that takes the sound name as an argument was deprecated and nuked. Leaving broken code behind it.
The easy and English sounding way to avoid this is to give the modifier it's rightful place as the receiver of the message.
'click' sound play.
Is IMHO the right way to say lets play a click like sound. It sounds right when you speak it.
I feel very strongly about this.
Any other solution I could propose would involve arbitrary invention and would not be as general.
Who wants to remember what class is responsible for playing a click sound when programming an application. This solution is elegant.
Remember the old class used was Object.
So you could say:
self beep: 'click'
and aviod looking up the sound making class or creating a new object just to play your sound.
Conversion methods are used all the time. While I have seen some warning against using them too readily I have not seen any more elegant solutions.
So I am stating that all strings should be able to make a sound if they so wish.
The #sound method is in charge of knowing what that sound should be. Playing a library sound if one exists of a default sound if one does not. It doesn't belong to the String package it belongs to the Sound package along with the class that keeps the Sound Library. It extends the String classes.
The programmer should be having fun using squeak not a frustrating time trying to find the missing word.
Sorry for the rant. I feel quite strongly about this and dislike the additional hurdles being put in the way of an elegant solution.
Rantingly, --Jerome Peace |
|
|
(0013716)
|
wiz
|
04-18-10 03:41
|
|
I have submitted
Sound-wiz.16 to the inbox.
In case it should prove acceptable.
I am also using this simple case to learn the process of submitting .mcz versions of things.
I am still an MC luddite. So feedback on the process is appreciated as I try to learn more.
hth,
Yours in curiosity and service, --Jerome Peace |
|
|
(0013744)
|
wiz
|
05-03-10 04:20
|
|
Fixed. Sound-wiz.18 now in trunk.
To meet Berts demands the selector is called #asSound rather than #sound.
So tests need updating. |
|
|
(0013745)
|
wiz
|
05-03-10 04:35
|
|
SoundSupportTests.2.cs uploaded.
Changed selector name in test and class comment
from #sound to asSound
Also submitted changes to inbox as Tests-wiz.75.mcz
|
|
|
(0013746)
|
wiz
|
05-03-10 04:38
|
|
see notes.
Selector has been accepted in trunk.
Tests are in inbox. |
|