Class.st
changeset 28 4606b818d646
parent 22 847106305963
child 37 d9a302eaa3ef
equal deleted inserted replaced
27:d98f9dd437f7 28:4606b818d646
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
    12 
    13 ClassDescription subclass:#Class
    13 ClassDescription subclass:#Class
    14        instanceVariableNames:'classvars comment subclasses classFileName'
    14        instanceVariableNames:'classvars comment subclasses classFileName'
    15        classVariableNames:'updatingChanges'
    15        classVariableNames:'UpdatingChanges'
    16        poolDictionaries:''
    16        poolDictionaries:''
    17        category:'Kernel-Classes'
    17        category:'Kernel-Classes'
    18 !
    18 !
    19 
    19 
    20 Class comment:'
    20 Class comment:'
    39 classFileName   <String>        the file (or nil) where the classes
    39 classFileName   <String>        the file (or nil) where the classes
    40                                 sources are found
    40                                 sources are found
    41 
    41 
    42 Class variables:
    42 Class variables:
    43 
    43 
    44 updatingChanges <Boolean>       true if the changes-file shall be updated
    44 UpdatingChanges <Boolean>       true if the changes-file shall be updated
    45 
    45 
    46 WARNING: layout known by compiler and runtime system
    46 WARNING: layout known by compiler and runtime system
    47 
    47 
    48 $Header: /cvs/stx/stx/libbasic/Class.st,v 1.6 1993-12-16 10:52:05 claus Exp $
    48 $Header: /cvs/stx/stx/libbasic/Class.st,v 1.7 1994-01-08 16:08:02 claus Exp $
    49 written Spring 89 by claus
    49 written Spring 89 by claus
    50 '!
    50 '!
    51 
    51 
    52 !Class class methodsFor:'initialization'!
    52 !Class class methodsFor:'initialization'!
    53 
    53 
    54 initialize
    54 initialize
    55     "the classvariable 'updatingChanges' controls if changes are put
    55     "the classvariable 'UpdatingChanges' controls if changes are put
    56      into the changes-file; normally this variable is set to true, but
    56      into the changes-file; normally this variable is set to true, but
    57      for example during fileIn or when changes are applied, it is set to false
    57      for example during fileIn or when changes are applied, it is set to false
    58      to prevent changes file from getting too much junk."
    58      to prevent changes file from getting too much junk."
    59      
    59      
    60     updatingChanges := true
    60     UpdatingChanges := true
    61 ! !
    61 ! !
    62 
    62 
    63 !Class class methodsFor:'creating new classes'!
    63 !Class class methodsFor:'creating new classes'!
    64 
    64 
    65 new
    65 new
   573 updateChanges:aBoolean
   573 updateChanges:aBoolean
   574     "turn on/off changes management"
   574     "turn on/off changes management"
   575 
   575 
   576     |prev|
   576     |prev|
   577 
   577 
   578     prev := updatingChanges.
   578     prev := UpdatingChanges.
   579     updatingChanges := aBoolean.
   579     UpdatingChanges := aBoolean.
   580     ^ prev
   580     ^ prev
   581 !
   581 !
   582 
   582 
   583 changesStream
   583 changesStream
   584     "return a Stream for the changes file"
   584     "return a Stream for the changes file"
   585 
   585 
   586     |aStream|
   586     |aStream|
   587 
   587 
   588     updatingChanges ifTrue:[
   588     UpdatingChanges ifTrue:[
   589         aStream := FileStream oldFileNamed:'changes'.
   589         aStream := FileStream oldFileNamed:'changes'.
   590         aStream isNil ifTrue:[
   590         aStream isNil ifTrue:[
   591             aStream := FileStream newFileNamed:'changes'.
   591             aStream := FileStream newFileNamed:'changes'.
   592             aStream isNil ifTrue:[
   592             aStream isNil ifTrue:[
   593                 self error:'cannot update changes file'
   593                 self error:'cannot update changes file'