The Trunk: Traits-ar.281.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Traits-ar.281.mcz

commits-2
Andreas Raab uploaded a new version of Traits to project The Trunk:
http://source.squeak.org/trunk/Traits-ar.281.mcz

==================== Summary ====================

Name: Traits-ar.281
Author: ar
Time: 4 March 2010, 9:14:46.573 pm
UUID: 787c91fc-51ce-3245-ab67-a8e669838785
Ancestors: Traits-nice.280

Fix a tiny buglet in Traits using #includes: instead of #includesKey: for its name.

=============== Diff against Traits-nice.280 ===============

Item was changed:
  ----- Method: Trait>>setName:andRegisterInCategory:environment: (in category 'initialize') -----
  setName: aSymbol andRegisterInCategory: categorySymbol environment: aSystemDictionary
  (self isValidTraitName: aSymbol) ifFalse: [self error:'Invalid trait name'].
 
  (self environment == aSystemDictionary
  and: [self name = aSymbol
  and: [self category = categorySymbol]]) ifTrue: [^self].
 
+ ((aSystemDictionary includesKey: aSymbol) and: [(aSystemDictionary at: aSymbol) ~~ self])
- ((aSystemDictionary includes: aSymbol) and: [(aSystemDictionary at: aSymbol) ~~ self])
  ifTrue: [self error: 'The name ''' , aSymbol , ''' is already used'].
 
  (self environment notNil and: [self name notNil and: [self name ~= aSymbol]]) ifTrue: [
  self environment renameClass: self as: aSymbol].
 
  self name: aSymbol.
  self environment: aSystemDictionary.
  self environment at: self name put: self.
  self environment organization classify: self name under: categorySymbol.
  ^ true!