A new version of Protocols was added to project The Inbox:
http://source.squeak.org/inbox/Protocols-jmck.45.mcz==================== Summary ====================
Name: Protocols-jmck.45
Author: jmck
Time: 22 September 2013, 12:37:23.613 am
UUID: b83640df-7388-174b-96e1-39405e822555
Ancestors: Protocols-jmck.44, Protocols-nice.44
-rewrite fix for Vocabulary class>>typeChoices
=============== Diff against Protocols-jmck.44 ===============
Item was changed:
----- Method: Vocabulary class>>typeChoices (in category 'type vocabularies') -----
typeChoices
"Answer a list of all user-choosable data types"
| aList |
+ aList := (self allStandardVocabularies
- (aList := self allStandardVocabularies
select:
[:aVocab | aVocab representsAType]
thenCollect:
+ [:aVocab | aVocab vocabularyName]) asSortedArray.
+ Preferences allowEtoyUserCustomEvents ifFalse: [ ^aList copyWithout: #CustomEvents ].
+ ^ aList!
- [:aVocab | aVocab vocabularyName]).
- Preferences allowEtoyUserCustomEvents ifFalse: [aList removeKey: #CustomEvents].
- ^ aList asSortedArray!
Item was changed:
----- Method: Vocabulary>>translatedWordingFor: (in category 'translation') -----
translatedWordingFor: aSymbol
"If I have a translated wording for aSymbol, return it, else return aSymbol. Caveat: at present, this mechanism is only germane for *assignment-operator wordings*"
+ #(#':' #Incr: #Decr: #Mult:) with: #('' 'increase by' 'decrease by' 'multiply by') do:
- #(: Incr: Decr: Mult:) with: #('' 'increase by' 'decrease by' 'multiply by') do:
[:a :b | aSymbol = a ifTrue: [^ b translated]].
^ aSymbol translated!