[etoys-dev] Etoys: ScratchConnect-bf.3.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Jun 24 13:30:41 EDT 2012
Bert Freudenberg uploaded a new version of ScratchConnect to project Etoys:
http://source.squeak.org/etoys/ScratchConnect-bf.3.mcz
==================== Summary ====================
Name: ScratchConnect-bf.3
Author: bf
Time: 24 June 2012, 7:30:35 pm
UUID: f6d6e846-170f-4e33-8821-dbf77d49755d
Ancestors: ScratchConnect-Richo.2
ScratchConnect fixes from Koji Yokokawa
SQ-1085: ScratchClient>>broadcast: should be send message as UTF8
SQ-1086: Remove 'receive messages' tile, change help text of 'send variables'
SQ-1087: Player>>sensorUpdate: lacks a space to form the Scratch command.
=============== Diff against ScratchConnect-Richo.2 ===============
Item was changed:
----- Method: Player>>sensorUpdate: (in category '*scratchconnect') -----
sensorUpdate: aString
+ self costume renderedMorph sendScratchCommand: 'sensor-update '
- self costume renderedMorph sendScratchCommand: 'sensor-update'
, (aString convertToEncoding: 'UTF8')!
Item was changed:
----- Method: ScratchClientMorph class>>additionsToViewerCategoryScratchCommand (in category 'scripting') -----
additionsToViewerCategoryScratchCommand
+ "Answer further viewer additions relating to the Scratch Networking Protocol; these
+ appear in the 'scratch command' category"
- "Answer furser viewer additons relating to the Scratch Networking Protocol; these
- appear in
- the 'scratch' category"
^ #('scratch command'
#(
+ #(#command #sendValues 'send my variables to Scratch')
- #(#command #sendValues 'send my variables to Scratch except scratchVariables.')
#(#command #broadcast: 'send a message to Scratch' #String)
- #(#command #receiveMessages 'receive messages from Scratch')
#(#command #updateSlider: 'sensor-update "slider" to Scratch' #Number)
#(#command #updateLight: 'sensor-update "light" to Scratch' #Number)
#(#command #updateSound: 'sensor-update "sound" to Scratch' #Number)
#(#command #updateResistanceA: 'sensor-update "resistance-A" to Scratch' #Number)
#(#command #updateResistanceB: 'sensor-update "resistance-B" to Scratch' #Number)
#(#command #updateResistanceC: 'sensor-update "resistance-C" to Scratch' #Number)
#(#command #updateResistanceD: 'sensor-update "resistance-D" to Scratch' #Number)
#(#command #sensorUpdate: 'sensor-update ["name" value] to Scratch' #String)
)
)!
Item was changed:
----- Method: ScratchClientMorph>>broadcast: (in category 'scratch') -----
broadcast: aString
| sendString |
aString isEmptyOrNil
ifTrue: [^ self].
+ sendString := (aString asString copyReplaceAll: '"' with: '""')
+ convertToEncoding: 'UTF8'.
- sendString := aString asString copyReplaceAll: '"' with: '""'.
self sendScratchCommand: 'broadcast "' , sendString , '" '!
More information about the etoys-dev
mailing list