The Trunk: Traits-ct.320.mcz
[email protected] Sat, 4 Jul 2026 22:49:07 0000
| Newsgroups | gmane.comp.lang.smalltalk.squeak.general |
|---|---|
| Message-ID | <[email protected]> |
Christoph Thiede uploaded a new version of Traits to project The Trunk: http://source.squeak.org/trunk/Traits-ct.320.mcz ==================== Summary ==================== Name: Traits-ct.320 Author: ct Time: 5 July 2026, 12:49:07.389152 am UUID: 5ca6da64-f004-4246-93fd-3a8cb7a4bbe6 Ancestors: Traits-ct.319 Fixes multi-environment issues with traits. =============== Diff against Traits-ct.319 =============== Item was changed: ----- Method: Trait class>>newTraitNamed:uses:category: (in category 'public') ----- newTraitNamed: aSymbol uses: aTraitCompositionOrCollection category: aString "Creates a new trait." | env | + env := Environment current. - env := self environment. ^self named: aSymbol uses: aTraitCompositionOrCollection category: aString env: env! Item was changed: ----- Method: Trait>>category (in category 'accessing') ----- category "Answer the system organization category for the receiver. First check whether the category name stored in the ivar is still correct and only if this fails look it up (latter is much more expensive)" | result | category ifNotNil: [ :symbol | + ((self environment organization listAtCategoryNamed: symbol) includes: self name) - ((SystemOrganization listAtCategoryNamed: symbol) includes: self name) ifTrue: [ ^symbol ] ]. + category := (result := self environment organization categoryOfElement: self name). - category := (result := SystemOrganization categoryOfElement: self name). ^result! Item was changed: ----- Method: Trait>>category: (in category 'accessing') ----- category: aString "Categorize the receiver under the system category, aString, removing it from any previous categorization." | oldCategory | oldCategory := category. aString isString ifTrue: [ category := aString asSymbol. + self environment organization classify: self name under: category ] - SystemOrganization classify: self name under: category ] ifFalse: [self errorCategoryName]. SystemChangeNotifier uniqueInstance class: self recategorizedFrom: oldCategory to: category! Squeak-dev mailing list -- [email protected] To unsubscribe send an email to [email protected]