'From Pharo2.0a of ''18 April 2012'' [Latest update: #20580] on 3 June 2013 at 12:12:14 pm'! !ClassBuilder methodsFor: 'validation' stamp: 'JanVrany 6/3/2013 12:12'! validateClassName: aString "Validate the new class name" | allowed | aString isSymbol ifFalse: [ ^ false ]. allowed := ($0 to: $9), {$_}, ($A to: $Z), ($a to: $z). (aString detect: [:c | (allowed includes: c) not] ifNone: [ ]) ifNotNil: [ :c | self error: 'Invalid character: ''', c printString, ''''. ^ false]. " NO, naming convetions should not be enforced at this level!! aString first canBeGlobalVarInitial ifFalse:[ self error: 'Class names must be capitalized'. ^false]. " environ at: aString ifPresent:[:old| (old isKindOf: Behavior) ifFalse:[ self notify: aString, ' already exists!!\Proceed will store over it.' withCRs]]. ^ true! !