# HG changeset patch # User Claus Gittinger # Date 1155298308 -7200 # Node ID 3c62e56cdea93c96a515dcfc16ff872a8a2a5e3b # Parent 9b8337afd628209e1a891cf5140c7b60e697f287 *** empty log message *** diff -r 9b8337afd628 -r 3c62e56cdea9 ClassBuilder.st --- a/ClassBuilder.st Fri Aug 11 14:11:39 2006 +0200 +++ b/ClassBuilder.st Fri Aug 11 14:11:48 2006 +0200 @@ -398,11 +398,11 @@ ^ nil ]. - (oldClass isBehavior and:[oldClass isLoaded not]) ifTrue:[ + (oldClass notNil and:[oldClass isBehavior and:[oldClass isLoaded not]]) ifTrue:[ oldClassToBecomeNew := oldClass ]. - (oldClass isBehavior and:[oldClass isLoaded]) ifFalse:[ + (oldClass notNil and:[oldClass isBehavior and:[oldClass isLoaded]]) ifFalse:[ oldClass := nil. (buildingPrivateClass and:[ParserFlags warnings and:[ParserFlags warnSTXSpecials]]) ifTrue:[ @@ -557,9 +557,9 @@ self handleHardNewClass:newClass. ^ newClass - "Created: / 26.5.1996 / 11:55:26 / cg" - "Modified: / 18.3.1999 / 18:23:31 / stefan" - "Modified: / 13.2.2000 / 22:59:57 / cg" + "Created: / 26-05-1996 / 11:55:26 / cg" + "Modified: / 18-03-1999 / 18:23:31 / stefan" + "Modified: / 11-08-2006 / 12:51:29 / cg" ! ! !ClassBuilder methodsFor:'building-helpers'! @@ -656,7 +656,8 @@ realNewName := classSymbol. "/ does the name imply a nameSpace ? - ((idx := realNewName indexOf:$:)) ~~ 0 ifTrue:[ + idx := realNewName indexOf:$: . + (idx > 1 and:[ (realNewName at:(idx+1)) == $: ]) ifTrue:[ "/ check for this namespace to exist nsName := realNewName copyTo:(idx - 1). nsName := nsName asSymbol. @@ -706,6 +707,8 @@ ] ]. ^ true + + "Modified: / 11-08-2006 / 12:49:46 / cg" ! environmentChanged:how with:argument @@ -1815,11 +1818,13 @@ fullNameString := className ]. idx := fullNameString lastIndexOf:$:. - className := (fullNameString copyFrom:idx+1) asSymbol. - environmentName := fullNameString copyTo:idx-2. - environment := Smalltalk at:environmentName asSymbol. - environment isNil ifTrue:[ - environment := NameSpace fullName:environmentName + (idx > 1 and:[(fullNameString at:idx-1) == $:]) ifTrue:[ + className := (fullNameString copyFrom:idx+1) asSymbol. + environmentName := fullNameString copyTo:idx-2. + environment := Smalltalk at:environmentName asSymbol. + environment isNil ifTrue:[ + environment := NameSpace fullName:environmentName + ]. ]. ]. @@ -1835,6 +1840,8 @@ className first isLetter ifFalse:[ self error:'invalid class name (must start with a letter)'. ]. + + "Modified: / 11-08-2006 / 12:46:54 / cg" ! checkConventionsFor:className subClassOf:aClass instVarNames:instVarNameString classVarNames:classVarNameString @@ -2062,5 +2069,5 @@ !ClassBuilder class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/ClassBuilder.st,v 1.51 2006-03-14 18:43:20 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/ClassBuilder.st,v 1.52 2006-08-11 12:11:48 cg Exp $' ! !