diff -r 8041a5795bbf -r 80341bf0e03e NameSpace.st --- a/NameSpace.st Mon Aug 25 13:44:36 2003 +0200 +++ b/NameSpace.st Wed Aug 27 19:51:29 2003 +0200 @@ -139,7 +139,7 @@ Notice, that the nameSpace is created in the current one - dont get confused; we recommend, not to nest them too much." - |currentNameSpace newNamespace existing ok nameSym fullName| + |currentNameSpace newNameSpace existing ok nameSym fullName| ok := aStringOrSymbol first isLetter. ok ifTrue:[ @@ -149,13 +149,6 @@ ifTrue:[ ok := false. ] - -"/ 2 to:aStringOrSymbol size do:[:idx | |ch| -"/ ch := aStringOrSymbol at:idx. -"/ ok ifTrue:[ -"/ ok := ch isLetterOrDigit or:[ch == $_]. -"/ ] -"/ ] ]. ok ifFalse:[ self error:'invalid namespace name:''' , aStringOrSymbol printString , ''' (must be a valid identifier)'. @@ -164,8 +157,10 @@ nameSym := aStringOrSymbol asSymbol. self == NameSpace ifTrue:[ - currentNameSpace := Class nameSpaceQuerySignal query. - currentNameSpace isNil ifTrue:[currentNameSpace := Smalltalk]. + "/ currentNameSpace := Class nameSpaceQuerySignal query. + currentNameSpace isNil ifTrue:[ + currentNameSpace := Smalltalk + ]. fullName := nameSym ] ifFalse:[ currentNameSpace := self. @@ -175,16 +170,17 @@ (existing := currentNameSpace at:nameSym) notNil ifTrue:[ ^ existing ]. - - newNamespace := self subclass:fullName - instanceVariableNames:'' - classVariableNames:'' - poolDictionaries:'' - category:'uncategorized namespace'. + newNameSpace := self + subclass:fullName + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:'uncategorized namespace' + inEnvironment:Smalltalk. "/ nameSpaces are not in any package - newNamespace notNil ifTrue:[newNamespace setPackage:nil]. - ^ newNamespace + newNameSpace notNil ifTrue:[newNameSpace setPackage:nil]. + ^ newNameSpace " NameSpace name:'foo' @@ -521,5 +517,5 @@ !NameSpace class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/NameSpace.st,v 1.50 2003-06-20 07:24:24 stefan Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/NameSpace.st,v 1.51 2003-08-27 17:51:29 cg Exp $' ! !