'From Squeak3.2gamma of 5 February 2002 [latest update: #4743] on 6 March 2002 at 1:37:50 pm'! "Change Set: AcceptModuleClassDefs Date: 6 March 2002 Author: Dan Ingalls These changes allow a pre-module system to accept post-module class definitions. With regards to system categories, if the class exists already in the system, then its category will not be changed by the new definition. If it does not already exist, then the module path will be agglutinated with dashes to produce its category string."! !Class methodsFor: 'module compatibility' stamp: 'di 3/6/2002 13:33'! existingCategoryFor: className orConvert: pathArray | existing | existing _ Smalltalk at: className ifAbsent: [nil]. (existing isKindOf: Class) ifTrue: [^ existing category]. ^ String streamContents: [:s | pathArray do: [:pathSymbol | s nextPutAll: pathSymbol] separatedBy: [s nextPutAll: '-']] ! ! !Class methodsFor: 'module compatibility' stamp: 'di 3/6/2002 13:32'! subclass: className instanceVariableNames: f classVariableNames: d module: pathArray "Accept new form of class defs from module systems" ^ self subclass: className instanceVariableNames: f classVariableNames: d poolDictionaries: '' category: (self existingCategoryFor: className orConvert: pathArray) ! ! !Class methodsFor: 'module compatibility' stamp: 'di 3/6/2002 13:32'! variableByteSubclass: className instanceVariableNames: f classVariableNames: d module: pathArray "Accept new form of class defs from module systems" ^ self variableByteSubclass: className instanceVariableNames: f classVariableNames: d poolDictionaries: '' category: (self existingCategoryFor: className orConvert: pathArray) ! ! !Class methodsFor: 'module compatibility' stamp: 'di 3/6/2002 13:32'! variableSubclass: className instanceVariableNames: f classVariableNames: d module: pathArray "Accept new form of class defs from module systems" ^ self variableSubclass: className instanceVariableNames: f classVariableNames: d poolDictionaries: '' category: (self existingCategoryFor: className orConvert: pathArray) ! ! !Class methodsFor: 'module compatibility' stamp: 'di 3/6/2002 13:32'! variableWordSubclass: className instanceVariableNames: f classVariableNames: d module: pathArray "Accept new form of class defs from module systems" ^ self variableWordSubclass: className instanceVariableNames: f classVariableNames: d poolDictionaries: '' category: (self existingCategoryFor: className orConvert: pathArray) ! ! !Class methodsFor: 'module compatibility' stamp: 'di 3/6/2002 13:32'! weakSubclass: className instanceVariableNames: f classVariableNames: d module: pathArray "Accept new form of class defs from module systems" ^ self weakSubclass: className instanceVariableNames: f classVariableNames: d poolDictionaries: '' category: (self existingCategoryFor: className orConvert: pathArray) ! !