ClassCategoryReader.st
changeset 350 54d513b45f51
parent 328 7b542c0bf1dd
child 370 20f04d9b371b
equal deleted inserted replaced
349:33d5e92c4ce7 350:54d513b45f51
    19 
    19 
    20 ClassCategoryReader comment:'
    20 ClassCategoryReader comment:'
    21 COPYRIGHT (c) 1989 by Claus Gittinger
    21 COPYRIGHT (c) 1989 by Claus Gittinger
    22 	     All Rights Reserved
    22 	     All Rights Reserved
    23 
    23 
    24 $Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.14 1995-05-01 21:28:25 claus Exp $
    24 $Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.15 1995-05-18 22:49:17 claus Exp $
    25 '!
    25 '!
    26 
    26 
    27 !ClassCategoryReader class methodsFor:'documentation'!
    27 !ClassCategoryReader class methodsFor:'documentation'!
    28 
    28 
    29 copyright
    29 copyright
    40 "
    40 "
    41 !
    41 !
    42 
    42 
    43 version
    43 version
    44 "
    44 "
    45 $Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.14 1995-05-01 21:28:25 claus Exp $
    45 $Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.15 1995-05-18 22:49:17 claus Exp $
    46 "
    46 "
    47 !
    47 !
    48 
    48 
    49 documentation
    49 documentation
    50 "
    50 "
   112 fileInFrom:aStream notifying:requestor passChunk:passChunk
   112 fileInFrom:aStream notifying:requestor passChunk:passChunk
   113     "read method-chunks from the input stream, aStream; compile them
   113     "read method-chunks from the input stream, aStream; compile them
   114      and add the methods to the class defined by the class-instance var;
   114      and add the methods to the class defined by the class-instance var;
   115      errors and notifications are passed to requestor"
   115      errors and notifications are passed to requestor"
   116 
   116 
   117     |aString done method|
   117     |aString done method compiler|
   118 
   118 
   119     Smalltalk silentLoading ifFalse:[
   119     Smalltalk silentLoading ifFalse:[
   120 	Transcript show:'  '; show:myClass name; show:' -> '; showCr:myCategory.
   120 	Transcript show:'  '; show:myClass name; show:' -> '; showCr:myCategory.
   121     ].
   121     ].
   122 
   122 
   137 		ignore ifFalse:[
   137 		ignore ifFalse:[
   138 		    passChunk ifTrue:[
   138 		    passChunk ifTrue:[
   139 			requestor source:aString
   139 			requestor source:aString
   140 		    ].
   140 		    ].
   141 
   141 
   142 		    method := myClass compilerClass
   142 		    compiler := myClass compilerClass.
   143 				 compile:aString
   143 
   144 				 forClass:myClass
   144 		    "/
   145 				 inCategory:myCategory
   145 		    "/ kludge - have to make ST/X's compiler protocol
   146 				 notifying:requestor
   146 		    "/ be compatible to ST-80's
   147 				 install:true
   147 		    "/
   148 				 skipIfSame:true.
   148 		    (compiler respondsTo:#compile:forClass:inCategory:notifying:install:skipIfSame:)
       
   149 		    ifTrue:[
       
   150 			method :=compiler
       
   151 				     compile:aString
       
   152 				     forClass:myClass
       
   153 				     inCategory:myCategory
       
   154 				     notifying:requestor
       
   155 				     install:true
       
   156 				     skipIfSame:true.
       
   157 
       
   158 		    ] ifFalse:[
       
   159 			method := compiler new
       
   160 				      compile:aString 
       
   161 				      in:myClass 
       
   162 				      notifying:requestor 
       
   163 				      ifFail:nil
       
   164 		    ].
   149 
   165 
   150 		    privacy notNil ifTrue:[
   166 		    privacy notNil ifTrue:[
   151 			privacy == #private ifTrue:[
   167 			privacy == #private ifTrue:[
   152 			    method setToPrivate
   168 			    method setToPrivate
   153 			] ifFalse:[
   169 			] ifFalse:[