[squeak-dev] The Trunk: EToys-nice.90.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jan 2 22:52:08 UTC 2013
Nicolas Cellier uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-nice.90.mcz
==================== Summary ====================
Name: EToys-nice.90
Author: nice
Time: 2 January 2013, 11:50:39.788 pm
UUID: a0691b99-e190-4cc9-89b5-cc89786efc29
Ancestors: EToys-bf.89
Use at:ifAbsentPut: instead of at:ifAbsent: [ at:put: ]
This is an update of http://bugs.squeak.org/view.php?id=5667
=============== Diff against EToys-bf.89 ===============
Item was changed:
----- Method: CardPlayer>>matchIndex: (in category 'as template') -----
matchIndex: newPlace
| tms pair |
"One we are looking at, in cards that matched the last template search."
tms := self class classPool at: #TemplateMatches ifAbsent: [
self class addClassVarName: 'TemplateMatches'.
self class classPool at: #TemplateMatches put: IdentityDictionary new].
+ pair := tms at: self ifAbsentPut: [Array new: 2].
- pair := tms at: self ifAbsent: [tms at: self put: (Array new: 2)].
pair at: 2 put: newPlace.
newPlace = 0 ifTrue: [^ self].
pair first ifNil: [^ self].
(costume valueOfProperty: #myStack ifAbsent: [^ self]) goToCard:
((pair first "list") at: newPlace).
self changed: #matchIndex. "update my selection"
!
Item was changed:
----- Method: Player class>>assuredMethodInterfaceFor: (in category 'scripts') -----
assuredMethodInterfaceFor: aSelector
"Answer the method interface object for aSelector, creating it if it does not already exist."
| selSym aMethodInterface |
selSym := aSelector asSymbol.
+ aMethodInterface := self scripts at: selSym ifAbsentPut:
+ [self nascentUserScriptInstance playerClass: self selector: selSym].
- aMethodInterface := self scripts at: selSym ifAbsent:
- [scripts at: selSym put: (self nascentUserScriptInstance playerClass: self selector: selSym)].
^ aMethodInterface!
More information about the Squeak-dev
mailing list
|