Behavior.st
changeset 6754 d9c0f178f091
parent 6733 4f8a80a22261
child 6865 434e45411991
equal deleted inserted replaced
6753:1a4a541850f2 6754:d9c0f178f091
  3188     ^ true
  3188     ^ true
  3189 !
  3189 !
  3190 
  3190 
  3191 commonSuperclass:aClass
  3191 commonSuperclass:aClass
  3192     "Return the common superclass of the receiver and aClass.
  3192     "Return the common superclass of the receiver and aClass.
  3193      Assumes that there is a common superclass of any two classes."
  3193      Assumes that there is a common superclass of any two classes.
       
  3194      (might return nil, if either the receiver or the argument inherit from nil)"
  3194 
  3195 
  3195     (aClass includesBehavior:self) ifTrue:[^ self].
  3196     (aClass includesBehavior:self) ifTrue:[^ self].
  3196     (self inheritsFrom:aClass) ifTrue:[^ aClass].
  3197     (self inheritsFrom:aClass) ifTrue:[^ aClass].
  3197     ^ self superclass commonSuperclass:aClass
  3198     superclass isNil ifTrue:[^ nil].
       
  3199     ^ superclass commonSuperclass:aClass
  3198 
  3200 
  3199     "
  3201     "
  3200      Integer commonSuperclass:Fraction  
  3202      Integer commonSuperclass:Fraction  
  3201      SmallInteger commonSuperclass:Fraction  
  3203      SmallInteger commonSuperclass:Fraction  
  3202      View commonSuperclass:Form  
  3204      View commonSuperclass:Form  
  3203      View commonSuperclass:Image  
  3205      View commonSuperclass:Image  
       
  3206      Integer commonSuperclass:Autoload      
  3204     "
  3207     "
  3205 
  3208 
  3206     "Modified: / 10.7.1998 / 02:13:04 / cg"
  3209     "Modified: / 10.7.1998 / 02:13:04 / cg"
  3207 !
  3210 !
  3208 
  3211 
  4382 ! !
  4385 ! !
  4383 
  4386 
  4384 !Behavior class methodsFor:'documentation'!
  4387 !Behavior class methodsFor:'documentation'!
  4385 
  4388 
  4386 version
  4389 version
  4387     ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.213 2002-09-04 10:34:31 cg Exp $'
  4390     ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.214 2002-09-12 09:13:07 cg Exp $'
  4388 ! !
  4391 ! !