added #includesBehavior for ST80 compatibility
authorClaus Gittinger <cg@exept.de>
Thu, 19 Jun 1997 18:15:47 +0200
changeset 2698 26abb8941250
parent 2697 fc8552cd6ebf
child 2699 2a47baf52313
added #includesBehavior for ST80 compatibility
Behavior.st
--- a/Behavior.st	Thu Jun 19 16:57:04 1997 +0200
+++ b/Behavior.st	Thu Jun 19 18:15:47 1997 +0200
@@ -2900,6 +2900,22 @@
     "Modified: 10.2.1996 / 13:15:56 / cg"
 !
 
+includesBehavior:aClass
+    "return true, if the receiver includes the behavior of aClass;
+     i.e. if is either identical to a class or inherits from it."
+
+    ^ (self == aClass) or:[self isSubclassOf:aClass]
+
+    "
+     True includesBehavior:Object  
+     True includesBehavior:Boolean 
+     True includesBehavior:True    
+     True includesBehavior:False   
+    "
+
+    "Modified: 19.6.1997 / 18:14:35 / cg"
+!
+
 includesSelector:aSelector
     "return true, if the methodDictionary of THIS class includes
      a method for aSelector.
@@ -2921,7 +2937,8 @@
 !
 
 inheritsFrom:aClass
-    "return true, if the receiver inherits methods from aClass"
+    "return true, if the receiver inherits methods from aClass;
+     i.e. if aClass is on the receivers superclass chain."
 
     ^ self isSubclassOf:aClass
 
@@ -2929,6 +2946,8 @@
      True inheritsFrom:Object
      LinkedList inheritsFrom:Array
     "
+
+    "Modified: 19.6.1997 / 18:13:21 / cg"
 !
 
 instanceCount
@@ -3561,5 +3580,5 @@
 !Behavior class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.111 1997-06-03 10:05:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.112 1997-06-19 16:15:47 cg Exp $'
 ! !