--- a/Metaclass.st Thu Feb 23 22:34:26 2006 +0100
+++ b/Metaclass.st Thu Feb 23 22:36:51 2006 +0100
@@ -430,76 +430,76 @@
s := 'nil'
] ifFalse:[
superclassNamespace := superclass nameSpace.
- fullName ifTrue:[
- s := superclass name.
- "/ be careful: if the superclasses ns is Smalltalk,
- "/ AND this is the definition of a private class,
- "/ AND a private class with the same name as my superclas
- "/ exists in my owning class,
- "/ THEN we MUST add the smalltalk-prefix.
- "/ (otherwise, we get the private class as superclass when accepting the
- "/ next time)
- owner notNil ifTrue:[
- superclassNamespace == Smalltalk ifTrue:[
- (owner privateClassesAt:superclass name) notNil ifTrue:[
- s := superclass nameWithNameSpacePrefix.
- ].
- ].
- ].
+
+ "/ be careful: if the superclasses ns is Smalltalk,
+ "/ AND this is the definition of a private class,
+ "/ AND a private class with the same name as my superclas
+ "/ exists in my owning class,
+ "/ THEN we MUST add the smalltalk-prefix.
+ "/ (otherwise, we get the private class as superclass when accepting the
+ "/ next time)
+ (owner notNil
+ and:[ superclassNamespace == Smalltalk
+ and:[ (owner privateClassesAt:superclass name) notNil ]]) ifTrue:[
+ s := superclass nameWithNameSpacePrefix.
] ifFalse:[
- (ns == superclassNamespace
- and:[superclass owningClass isNil]) ifTrue:[
- "/ superclass is in the same namespace and not private;
- "/ still prepend namespace prefix for private classes,
- "/ to avoid confusing stc, which needs that information.
- "/ LATE note (AUG2002) - no longer; stc was fixed.
+ fullName ifTrue:[
+ s := superclass name.
+ ] ifFalse:[
+ (ns == superclassNamespace
+ and:[superclass owningClass isNil]) ifTrue:[
+ "/ superclass is in the same namespace and not private;
+ "/ still prepend namespace prefix for private classes,
+ "/ to avoid confusing stc, which needs that information.
+ "/ LATE note (AUG2002) - no longer; stc was fixed.
"/ owner notNil ifTrue:[
"/ s := superclass name
"/ ] ifFalse:[
- s := superclass nameWithoutPrefix
+ s := superclass nameWithoutPrefix
"/ ]
- ] ifFalse:[
- "/ a very special (rare) situation:
- "/ my superclass resides in another nameSpace,
- "/ but there is something else named like this
- "/ to be found in my nameSpace (or a private class)
+ ] ifFalse:[
+ "/ a very special (rare) situation:
+ "/ my superclass resides in another nameSpace,
+ "/ but there is something else named like this
+ "/ to be found in my nameSpace (or a private class)
- superNameWithoutNameSpacePrefix := superclass nameWithoutNameSpacePrefix asSymbol.
- cls := aClass privateClassesAt:superNameWithoutNameSpacePrefix.
- cls isNil ifTrue:[
- (topOwner := aClass topOwningClass) isNil ifTrue:[
- ns := aClass nameSpace.
- ns notNil ifTrue:[
- cls := ns privateClassesAt:superNameWithoutNameSpacePrefix
+ superNameWithoutNameSpacePrefix := superclass nameWithoutNameSpacePrefix asSymbol.
+ cls := aClass privateClassesAt:superNameWithoutNameSpacePrefix.
+ cls isNil ifTrue:[
+ (topOwner := aClass topOwningClass) isNil ifTrue:[
+ ns := aClass nameSpace.
+ ns notNil ifTrue:[
+ cls := ns privateClassesAt:superNameWithoutNameSpacePrefix
+ ] ifFalse:[
+ "/ aClass error:'unexpected nil namespace'
+ ]
] ifFalse:[
- "/ aClass error:'unexpected nil namespace'
+ cls := topOwner nameSpace at:superNameWithoutNameSpacePrefix.
]
+ ].
+ (cls notNil and:[cls ~~ superclass]) ifTrue:[
+ s := superclassNamespace name , '::' , superNameWithoutNameSpacePrefix
] ifFalse:[
- cls := topOwner nameSpace at:superNameWithoutNameSpacePrefix.
- ]
- ].
- (cls notNil and:[cls ~~ superclass]) ifTrue:[
- s := superclassNamespace name , '::' , superNameWithoutNameSpacePrefix
- ] ifFalse:[
- "/ no class with that name found in my namespace ...
- "/ if the superclass resides in Smalltalk,
- "/ suppress prefix; otherwise, use full prefix.
- (superclassNamespace notNil
- and:[superclassNamespace ~~ Smalltalk]) ifTrue:[
- (owner notNil
- and:[(topOwner := owner topOwningClass) notNil
- and:[topOwner nameSpace == superclass topOwningClass "owningClass" nameSpace
- ]]) ifTrue:[
- s := superNameWithoutNameSpacePrefix
- ] ifFalse:[
- ns == superclass topNameSpace ifTrue:[
+ "/ no class with that name found in my namespace ...
+ "/ if the superclass resides in Smalltalk,
+ "/ suppress prefix; otherwise, use full prefix.
+ (superclassNamespace notNil
+ and:[superclassNamespace ~~ Smalltalk]) ifTrue:[
+ (owner notNil
+ and:[(topOwner := owner topOwningClass) notNil
+ and:[topOwner nameSpace == superclass topOwningClass "owningClass" nameSpace
+ ]]) ifTrue:[
s := superNameWithoutNameSpacePrefix
] ifFalse:[
- s := superclass name
+ ns == superclass topNameSpace ifTrue:[
+ s := superNameWithoutNameSpacePrefix
+ ] ifFalse:[
+ s := superclass name
+ ]
]
+ ] ifFalse:[
+ s := superNameWithoutNameSpacePrefix
]
- ] ifFalse:[
- s := superNameWithoutNameSpacePrefix
]
]
]
@@ -831,7 +831,7 @@
!Metaclass class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.193 2006-02-21 13:20:50 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.194 2006-02-23 21:36:51 cg Exp $'
! !
Metaclass initialize!