Class.st
changeset 403 e4d9cc32c794
parent 399 c15cfaf3ed4d
child 406 ed16ba9383c3
equal deleted inserted replaced
402:8e2f6d771c51 403:e4d9cc32c794
    20 
    20 
    21 Class comment:'
    21 Class comment:'
    22 COPYRIGHT (c) 1989 by Claus Gittinger
    22 COPYRIGHT (c) 1989 by Claus Gittinger
    23 	      All Rights Reserved
    23 	      All Rights Reserved
    24 
    24 
    25 $Header: /cvs/stx/stx/libbasic/Class.st,v 1.53 1995-08-16 18:26:01 claus Exp $
    25 $Header: /cvs/stx/stx/libbasic/Class.st,v 1.54 1995-08-19 01:32:24 claus Exp $
    26 '!
    26 '!
    27 
    27 
    28 !Class class methodsFor:'documentation'!
    28 !Class class methodsFor:'documentation'!
    29 
    29 
    30 copyright
    30 copyright
    41 "
    41 "
    42 !
    42 !
    43 
    43 
    44 version
    44 version
    45 "
    45 "
    46 $Header: /cvs/stx/stx/libbasic/Class.st,v 1.53 1995-08-16 18:26:01 claus Exp $
    46 $Header: /cvs/stx/stx/libbasic/Class.st,v 1.54 1995-08-19 01:32:24 claus Exp $
    47 "
    47 "
    48 !
    48 !
    49 
    49 
    50 documentation
    50 documentation
    51 "
    51 "
   755 	^ nil
   755 	^ nil
   756     ].
   756     ].
   757     FileOutErrorSignal handle:[:ex |
   757     FileOutErrorSignal handle:[:ex |
   758 	aStream nextPutAll:'"no source available"'.
   758 	aStream nextPutAll:'"no source available"'.
   759     ] do:[
   759     ] do:[
   760         self fileOutOn:aStream.
   760 	self fileOutOn:aStream.
   761     ].
   761     ].
   762     aStream close.
   762     aStream close.
   763     aStream := FileStream oldFileNamed:'__temp'.
   763     aStream := FileStream oldFileNamed:'__temp'.
   764     aStream isNil ifTrue:[
   764     aStream isNil ifTrue:[
   765 	self notify:'oops - cannot reopen temp file'.
   765 	self notify:'oops - cannot reopen temp file'.
  1106 !
  1106 !
  1107 
  1107 
  1108 addChangeRecordForClass:aClass to:aStream
  1108 addChangeRecordForClass:aClass to:aStream
  1109     "append a class-definition-record to aStream"
  1109     "append a class-definition-record to aStream"
  1110 
  1110 
  1111     aClass fileOutDefinitionOn:aStream.
  1111     aClass isLoaded ifTrue:[
  1112     aStream nextPut:(aStream class chunkSeparator).
  1112 	aClass fileOutDefinitionOn:aStream.
       
  1113 	aStream nextPut:(aStream class chunkSeparator).
       
  1114     ]
  1113 !
  1115 !
  1114 
  1116 
  1115 addChangeRecordForClassInstvars:aClass to:aStream
  1117 addChangeRecordForClassInstvars:aClass to:aStream
  1116     "append a class-instvars-record to aStream"
  1118     "append a class-instvars-record to aStream"
  1117 
  1119 
  1979 
  1981 
  1980 fileOutOn:aStream
  1982 fileOutOn:aStream
  1981     "file out my definition and all methods onto aStream"
  1983     "file out my definition and all methods onto aStream"
  1982 
  1984 
  1983     |collectionOfCategories copyrightText sep comment cls|
  1985     |collectionOfCategories copyrightText sep comment cls|
       
  1986 
       
  1987     self isLoaded ifFalse:[
       
  1988 	^ FileOutErrorSignal 
       
  1989 	    raiseRequestWith:self
       
  1990 		 errorString:'will not fileOut unloaded classes'
       
  1991     ].
  1984 
  1992 
  1985     "
  1993     "
  1986      if there is a copyright method, add a copyright comment
  1994      if there is a copyright method, add a copyright comment
  1987      at the beginning, taking the string from the copyright method.
  1995      at the beginning, taking the string from the copyright method.
  1988      We cannot do this unconditionally - that would lead to my copyrights
  1996      We cannot do this unconditionally - that would lead to my copyrights