ClassCategoryReader.st
changeset 350 54d513b45f51
parent 328 7b542c0bf1dd
child 370 20f04d9b371b
--- a/ClassCategoryReader.st	Thu May 18 17:33:58 1995 +0200
+++ b/ClassCategoryReader.st	Fri May 19 00:49:59 1995 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.14 1995-05-01 21:28:25 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.15 1995-05-18 22:49:17 claus Exp $
 '!
 
 !ClassCategoryReader class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.14 1995-05-01 21:28:25 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.15 1995-05-18 22:49:17 claus Exp $
 "
 !
 
@@ -114,7 +114,7 @@
      and add the methods to the class defined by the class-instance var;
      errors and notifications are passed to requestor"
 
-    |aString done method|
+    |aString done method compiler|
 
     Smalltalk silentLoading ifFalse:[
 	Transcript show:'  '; show:myClass name; show:' -> '; showCr:myCategory.
@@ -139,13 +139,29 @@
 			requestor source:aString
 		    ].
 
-		    method := myClass compilerClass
-				 compile:aString
-				 forClass:myClass
-				 inCategory:myCategory
-				 notifying:requestor
-				 install:true
-				 skipIfSame:true.
+		    compiler := myClass compilerClass.
+
+		    "/
+		    "/ kludge - have to make ST/X's compiler protocol
+		    "/ be compatible to ST-80's
+		    "/
+		    (compiler respondsTo:#compile:forClass:inCategory:notifying:install:skipIfSame:)
+		    ifTrue:[
+			method :=compiler
+				     compile:aString
+				     forClass:myClass
+				     inCategory:myCategory
+				     notifying:requestor
+				     install:true
+				     skipIfSame:true.
+
+		    ] ifFalse:[
+			method := compiler new
+				      compile:aString 
+				      in:myClass 
+				      notifying:requestor 
+				      ifFail:nil
+		    ].
 
 		    privacy notNil ifTrue:[
 			privacy == #private ifTrue:[