[etoys-dev] Etoys: Etoys-bf.37.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Aug 17 19:11:18 EDT 2010
Bert Freudenberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-bf.37.mcz
==================== Summary ====================
Name: Etoys-bf.37
Author: bf
Time: 18 August 2010, 1:10:42 am
UUID: 4a90817f-dd7c-4e8a-bdef-07a7d9754ec6
Ancestors: Etoys-Richo.36
- make sure that default script names are legal selectors (fixes SQ-683, in Greek the translation of 'script' is not a legal selector)
=============== Diff against Etoys-Richo.36 ===============
Item was changed:
----- Method: Player>>unusedScriptName (in category 'misc') -----
unusedScriptName
"answer a name of the form 'scriptN', where N is one higher than the highest-numbered similarly-named script"
+ | defaultStem highestThus aPair |
+ defaultStem := self defaultScriptName.
+ highestThus := 0.
- | highestThus aPair |
- highestThus _ 0.
self class tileScriptNames do:
[:aName |
+ aPair := (aName copyWithout: $:) stemAndNumericSuffix.
+ aPair first = defaultStem ifTrue: [highestThus := highestThus max: aPair last]].
+ ^ (defaultStem, (highestThus + 1) printString) asSymbol!
- aPair _ (aName copyWithout: $:) stemAndNumericSuffix.
- aPair first = 'script' translated ifTrue: [highestThus _ highestThus max: aPair last]].
- ^ ('script' translated, (highestThus + 1) printString) asSymbol!
Item was added:
+ ----- Method: Player>>defaultScriptName (in category 'misc') -----
+ defaultScriptName
+ ^'script' translated asLegalSelector!
Item was changed:
----- Method: Player>>isExpendableScript: (in category 'scripts-kernel') -----
isExpendableScript: aScriptName
^ (self isEmptyTileScript: aScriptName) and:
+ [aScriptName beginsWith: self defaultScriptName]
- [aScriptName beginsWith: 'script' translated]
!
More information about the etoys-dev
mailing list