Squeak Class Documentation category index | class index  
 
ClassDescription
  category: Kernel-Classes
  superclass: Behavior
  subclasses: Metaclass Class

I add a number of facilities to basic Behaviors:
Named instance variables
Category organization for methods
The notion of a name of this class (implemented as subclass responsibility)
The maintenance of a ChangeSet, and logging changes on a file
Most of the mechanism for fileOut.

I am an abstract class, in particular, my facilities are intended for inheritance by two subclasses, Class and Metaclass.

The slots 'organization' and 'methodDict' should ONLY be accessed by message in order for things to work during ImageSegment>>discoverActiveClasses (q.v.).

instance methods
  accessing
  classVersion
comment
comment:
comment:stamp:
isMeta
theNonMetaClass

  accessing class hierarchy
  allSubclasses
classesThatImplementAllOf:
printSubclassesOn:level:
removeUninstantiatedSubclassesSilently
subclasses
subclassesDo:
withAllSubclasses

  compiling
  acceptsLoggingOfCompilation
compile:classified:
compile:classified:notifying:
compile:classified:withStamp:notifying:
compile:classified:withStamp:notifying:logSource:
compile:notifying:
compile:notifying:trailer:ifFail:elseSetSelectorAndNode:
compileInobtrusively:classified:
compileProgrammatically:classified:
compileUnlogged:classified:notifying:
moveInstVarNamed:to:after:
noteCompilationOf:meta:
wantsChangeSetLogging
wantsRecompilationProgressReported

  copying
  copy:from:
copy:from:classified:
copyAll:from:
copyAll:from:classified:
copyAllCategoriesFrom:
copyCategory:from:
copyCategory:from:classified:
copyMethodDictionaryFrom:

  fileIn/Out
  classComment:
classComment:stamp:
commentFollows
commentStamp:
commentStamp:prior:
definition
definitionST80
definitionST80:
fileOutCategory:
fileOutCategory:asHtml:
fileOutCategory:on:moveSource:toFile:
fileOutChangedMessages:on:
fileOutChangedMessages:on:moveSource:toFile:
fileOutMethod:
fileOutMethod:asHtml:
fileOutOn:
fileOutOn:moveSource:toFile:
fileOutOrganizationOn:
methods
methodsFor:
methodsFor:priorSource:inFile:
methodsFor:stamp:
methodsFor:stamp:prior:
moveChangesTo:
printCategoryChunk:on:
printCategoryChunk:on:priorMethod:
printCategoryChunk:on:withStamp:priorMethod:
printCategoryChunk:withStamp:on:
printMethodChunk:withPreamble:on:moveSource:toFile:
reformatAll
reformatMethodAt:
reorganize

  initialize-release
  doneCompiling
obsolete
superclass:methodDictionary:format:
updateInstances:from:isMeta:
updateInstancesFrom:

  instance variables
  addInstVarName:
allInstVarNamesEverywhere
allUnreferencedClassVariables
browseClassVarRefs
browseClassVariables
browseInstVarDefs
browseInstVarRefs
checkForInstVarsOK:
chooseClassVarName
chooseInstVarAlphabeticallyThenDo:
chooseInstVarThenDo:
classThatDefinesClassVariable:
classThatDefinesInstanceVariable:
forceNewFrom:
instVarNames
removeInstVarName:
renameInstVar:to:
renameSilentlyInstVar:to:
replaceSilently:to:

  method dictionary
  allMethodCategoriesIntegratedThrough:
allMethodsInCategory:
induceMDFault
isUniClass
namedTileScriptSelectors
recoverFromMDFault
recoverFromMDFaultWithTrace
removeCategory:
removeSelector:
removeSelectorUnlogged:
ultimateSourceCodeAt:ifAbsent:

  organization
  category
category:
categoryFromUserWithPrompt:
letUserReclassify:
organization
organization:
whichCategoryIncludesSelector:
zapAllMethods
zapOrganization

  printing
  classVariablesString
instanceVariablesString
printOn:
printOnStream:
sharedPoolsString
storeOn:

  private
  errorCategoryName
instVarMappingFrom:
linesOfCode
newInstanceFrom:variable:size:map:
setInstVarNames:
spaceUsed

class methods
  no messages
 

instance methods
  accessing top  
 

classVersion

Default. Any class may return a later version to inform readers that use ReferenceStream. 8/17/96 tk


 

comment

Answer the receiver's comment. (If missing, supply a template)


 

comment:

Set the receiver's comment to be the argument, aStringOrText.


 

comment:stamp:

Set the receiver's comment to be the argument, aStringOrText.


 

isMeta


 

theNonMetaClass

Sent to a class or metaclass, always return the class


  accessing class hierarchy top  
 

allSubclasses

Answer a Set of the receiver's and the receiver's descendent's subclasses.


 

classesThatImplementAllOf:

Return an array of any classes that implement all the messages in selectorSet.


 

printSubclassesOn:level:

As part of the algorithm for printing a description of the receiver, print the
subclass on the file stream, aStream, indenting level times.


 

removeUninstantiatedSubclassesSilently

Remove the classes of any subclasses that have neither instances nor subclasses. Answer the number of bytes reclaimed


 

subclasses


 

subclassesDo:

Evaluate the argument, aBlock, for each of the receiver's immediate subclasses.


 

withAllSubclasses

Answer a Set of the receiver, the receiver's descendent's, and the
receiver's descendent's subclasses.


  compiling top  
 

acceptsLoggingOfCompilation

weird name is so that it will come lexically before #compile, so that a clean build can make it through. 7/7/96 sw


 

compile:classified:

Compile the argument, code, as source code in the context of the
receiver and install the result in the receiver's method dictionary under
the classification indicated by the second argument, heading. nil is to be
notified if an error occurs. The argument code is either a string or an
object that converts to a string or a PositionableStream on an object that
converts to a string.


 

compile:classified:notifying:


 

compile:classified:withStamp:notifying:


 

compile:classified:withStamp:notifying:logSource:


 

compile:notifying:

Refer to the comment in Behavior|compile:notifying:.


 

compile:notifying:trailer:ifFail:elseSetSelectorAndNode:

Intercept this message in order to remember system changes.
5/15/96 sw: modified so that if the class does not wish its methods logged in the changes file, then they also won't be accumulated in the current change set.
7/12/96 sw: use wantsChangeSetLogging to determine whether to put in change set


 

compileInobtrusively:classified:

Compile the code and classify the resulting method in the given category, leaving no trail in the system log, nor in any change set, nor in the 'recent submissions' list. This should only be used when you know for sure that the compilation will succeed.


 

compileProgrammatically:classified:

compile the given code programmatically. In the current theory, we always do this unlogged as well, and do not accumulate the change in the current change set


 

compileUnlogged:classified:notifying:


 

moveInstVarNamed:to:after:

Move the given instance variable to another class.


 

noteCompilationOf:meta:

A hook allowing some classes to react to recompilation of certain selectors


 

wantsChangeSetLogging

Answer whether code submitted for the receiver should be remembered by the changeSet mechanism. 7/12/96 sw


 

wantsRecompilationProgressReported

Answer whether the receiver would like progress of its recompilation reported interactively to the user.


  copying top  
 

copy:from:

Install the method associated with the first argument, sel, a message
selector, found in the method dictionary of the second argument, class,
as one of the receiver's methods. Classify the message under -As yet not
classified-.


 

copy:from:classified:

Install the method associated with the first arugment, sel, a message
selector, found in the method dictionary of the second argument, class,
as one of the receiver's methods. Classify the message under the third
argument, cat.


 

copyAll:from:

Install all the methods found in the method dictionary of the second
argument, class, as the receiver's methods. Classify the messages under
-As yet not classified-.


 

copyAll:from:classified:

Install all the methods found in the method dictionary of the second
argument, class, as the receiver's methods. Classify the messages under
the third argument, cat.


 

copyAllCategoriesFrom:

Specify that the categories of messages for the receiver include all of
those found in the class, aClass. Install each of the messages found in
these categories into the method dictionary of the receiver, classified
under the appropriate categories.


 

copyCategory:from:

Specify that one of the categories of messages for the receiver is cat, as
found in the class, class. Copy each message found in this category.


 

copyCategory:from:classified:

Specify that one of the categories of messages for the receiver is the
third argument, newCat. Copy each message found in the category cat in
class aClass into this new category.


 

copyMethodDictionaryFrom:

Copy the method dictionary of the donor class over to the receiver


  fileIn/Out top  
 

classComment:

Store the comment, aString or Text or RemoteString, associated with the class we are orgainzing. Empty string gets stored only if had a non-empty one before.


 

classComment:stamp:

Store the comment, aString or Text or RemoteString, associated with the class we are organizing. Empty string gets stored only if had a non-empty one before.


 

commentFollows

Answer a ClassCommentReader who will scan in the comment.


 

commentStamp:


 

commentStamp:prior:

Prior source link ignored when filing in.


 

definition

Answer a String that defines the receiver in good old ST-80.


 

definitionST80

Answer a String that defines the receiver.


 

definitionST80:

Answer a String that defines the receiver.


 

fileOutCategory:


 

fileOutCategory:asHtml:

FileOut the named category, possibly in Html format.


 

fileOutCategory:on:moveSource:toFile:

File a description of the receiver's category, aString, onto aFileStream. If
moveSource, is true, then set the method source pointer to the new file position.
Note when this method is called with moveSource=true, it is condensing the
.sources file, and should only write one preamble per method category.


 

fileOutChangedMessages:on:

File a description of the messages of the receiver that have been
changed (i.e., are entered into the argument, aSet) onto aFileStream.


 

fileOutChangedMessages:on:moveSource:toFile:

File a description of the messages of this class that have been
changed (i.e., are entered into the argument, aSet) onto aFileStream. If
moveSource, is true, then set the method source pointer to the new file position.
Note when this method is called with moveSource=true, it is condensing the
.changes file, and should only write a preamble for every method.


 

fileOutMethod:

Write source code of a single method on a file. Make up a name for the file.


 

fileOutMethod:asHtml:

Write source code of a single method on a file in .st or .html format


 

fileOutOn:

File a description of the receiver on aFileStream.


 

fileOutOn:moveSource:toFile:

File a description of the receiver on aFileStream. If the boolean
argument, moveSource, is true, then set the trailing bytes to the position
of aFileStream and to fileIndex in order to indicate where to find the
source code.


 

fileOutOrganizationOn:

File a description of the receiver's organization on aFileStream.


 

methods

Answer a ClassCategoryReader for compiling messages that are not classified, as in fileouts made with Smalltalk/V


 

methodsFor:

Answer a ClassCategoryReader for compiling the messages in the category, categoryName, of the receiver.


 

methodsFor:priorSource:inFile:

Prior source pointer ignored when filing in.


 

methodsFor:stamp:


 

methodsFor:stamp:prior:

Prior source link ignored when filing in.


 

moveChangesTo:

Used in the process of condensing changes, this message requests that
the source code of all methods of the receiver that have been changed
should be moved to newFile.


 

printCategoryChunk:on:


 

printCategoryChunk:on:priorMethod:


 

printCategoryChunk:on:withStamp:priorMethod:

Print a method category preamble. This must have a category name.
It may have an author/date stamp, and it may have a prior source link.
If it has a prior source link, it MUST have a stamp, even if it is empty.


 

printCategoryChunk:withStamp:on:


 

printMethodChunk:withPreamble:on:moveSource:toFile:

Copy the source code for the method associated with selector onto the fileStream. If moveSource true, then also set the source code pointer of the method.


 

reformatAll

Reformat all methods in this class.
Leaves old code accessible to version browsing


 

reformatMethodAt:


 

reorganize

During fileIn, !Rectangle reorganize! allows Rectangle to seize control and treat the next chunk as its organization. See the transfer of control where ReadWriteStream fileIn calls scanFrom:


  initialize-release top  
 

doneCompiling

A ClassBuilder has finished the compilation of the receiver.
This message is a notification for a class that needs to do some
cleanup / reinitialization after it has been recompiled.


 

obsolete

Make the receiver obsolete.


 

superclass:methodDictionary:format:

Basic initialization of the receiver


 

updateInstances:from:isMeta:

Recreate any existing instances of the argument, oldClass, as instances of the receiver, which is a newly changed class. Permute variables as necessary. Return the array of old instances (none of which should be pointed to legally by anyone but the array).


 

updateInstancesFrom:

Recreate any existing instances of the argument, oldClass, as instances of
the receiver, which is a newly changed class. Permute variables as
necessary. Return the array of old instances (none of which should be
pointed to legally by anyone but the array).


  instance variables top  
 

addInstVarName:

Add the argument, aString, as one of the receiver's instance variables.


 

allInstVarNamesEverywhere

Answer the set of inst var names used by the receiver, all superclasses, and all subclasses


 

allUnreferencedClassVariables

Answer a list of the names of all the receiver's unreferenced class vars, including those defined in superclasses


 

browseClassVarRefs

1/17/96 sw: moved here from Browser so that it could be used from a variety of places.


 

browseClassVariables

Put up a browser showing the receiver's class variables. 2/1/96 sw


 

browseInstVarDefs

Copied from browseInstVarRefs. Should be consolidated some day. 7/29/96 di
7/30/96 sw: did the consolidation


 

browseInstVarRefs

1/16/96 sw: moved here from Browser so that it could be used from a variety of places.
7/30/96 sw: call chooseInstVarThenDo: to get the inst var choice


 

checkForInstVarsOK:

Return true if instVarString does no include any names used in a subclass


 

chooseClassVarName

Present the user with a list of class variable names and answer the one selected, or nil if none


 

chooseInstVarAlphabeticallyThenDo:

Put up a menu of all the instance variables in the receiver, presented in alphabetical order, and when the user chooses one, evaluate aBlock with the chosen variable as its parameter.


 

chooseInstVarThenDo:

Put up a menu of all the instance variables in the receiver, and when
the user chooses one, evaluate aBlock with the chosen variable as its
parameter. If the list is 6 or larger, then offer an alphabetical
formulation as an alternative. triggered by a 'show alphabetically' item
at the top of the list.


 

classThatDefinesClassVariable:

Answer the class that defines the given class variable


 

classThatDefinesInstanceVariable:


 

forceNewFrom:

Create a new instance of the class and fill
its instance variables up with the array.


 

instVarNames

Answer an Array of the receiver's instance variable names.


 

removeInstVarName:

Remove the argument, aString, as one of the receiver's instance
variables. Create an error notification if the argument is not found.


 

renameInstVar:to:


 

renameSilentlyInstVar:to:


 

replaceSilently:to:

text-replace any part of a method. Used for class and pool variables. Don't touch the header. Not guaranteed to work if name appears in odd circumstances


  method dictionary top  
 

allMethodCategoriesIntegratedThrough:

Answer a list of all the method categories of the receiver and all its superclasses, up through mostGenericClass


 

allMethodsInCategory:

Answer a list of all the method categories of the receiver and all its superclasses


 

induceMDFault

Stache a copy of the methodDict in the organization slot (hack!),
and set the methodDict to nil. This will induce an MD fault on any message send.
See: ClassDescription>>recoverFromMDFault
and ImageSegment>>discoverActiveClasses.


 

isUniClass

Answer whether the receiver is a uniclass.


 

namedTileScriptSelectors

Answer a list of all the selectors of named tile scripts. Initially, only Player reimplements, but if we switch to a scheme in which every class can have uniclass subclasses, this would kick in elsewhere


 

recoverFromMDFault

This method handles methodDict faults to support, eg, discoverActiveClasses (qv).


 

recoverFromMDFaultWithTrace

This method handles emthodDict faults to support, eg, discoverActiveClasses (qv).


 

removeCategory:

Remove each of the messages categorized under aString in the method
dictionary of the receiver. Then remove the category aString.


 

removeSelector:

Remove the message whose selector is given from the method
dictionary of the receiver, if it is there. Answer nil otherwise.


 

removeSelectorUnlogged:

Remove the message whose selector is aSymbol from the method dictionary of the receiver, if it is there. Answer nil otherwise. Do not log the action either to the current change set or to the changes log


 

ultimateSourceCodeAt:ifAbsent:

Return the source code at selector, deferring to superclass if necessary


  organization top  
 

category

Answer the system organization category for the receiver.


 

category:

Categorize the receiver under the system category, cat, removing it from
any previous categorization.


 

categoryFromUserWithPrompt:

SystemDictionary categoryFromUserWithPrompt: 'testing'


 

letUserReclassify:

Put up a list of categories and solicit one from the user. Answer true if user indeed made a change, else false


 

organization

Answer the instance of ClassOrganizer that represents the organization
of the messages of the receiver.


 

organization:

Install an instance of ClassOrganizer that represents the organization of the messages of the receiver.


 

whichCategoryIncludesSelector:

Answer the category of the argument, aSelector, in the organization of
the receiver, or answer nil if the receiver does not inlcude this selector.


 

zapAllMethods

Remove all methods in this class which is assumed to be obsolete


 

zapOrganization

Remove the organization of this class by message categories.
This is typically done to save space in small systems. Classes and methods
created or filed in subsequently will, nonetheless, be organized


  printing top  
 

classVariablesString

Answer a string of my class variable names separated by spaces.


 

instanceVariablesString

Answer a string of my instance variable names separated by spaces.


 

printOn:

Refer to the comment in Object|printOn:.


 

printOnStream:

Refer to the comment in Object|printOn:.


 

sharedPoolsString

Answer a string of my shared pool names separated by spaces.


 

storeOn:

Classes and Metaclasses have global names.


  private top  
 

errorCategoryName


 

instVarMappingFrom:

Return the mapping from instVars of oldClass to new class that is used for converting old instances of oldClass.


 

linesOfCode

InterpreterSimulator linesOfCode 790


 

newInstanceFrom:variable:size:map:

Create a new instance of the receiver based on the given old instance.
The supplied map contains a mapping of the old instVar names into
the receiver's instVars


 

setInstVarNames:

Private - for class initialization only


 

spaceUsed

Answer a rough estimate of number of bytes used by this class and its metaclass. Does not include space used by class variables.


class methods
  no messages top