System

AbstractEvent
An AbstractEvent is xxxxxxxxx.
Instance Variables
environment: <Object>
item: <Object>
itemKind: <Object>
environment
- xxxxx
item
- xxxxx
itemKind
- xxxxx
allChangeKinds
allItemKinds
categoryKind
changeKind
class:
class:category:
classCategory:
classKind
comment1
comment2
comment3
environmentAt:
eventSelector
eventSelectorBlock
expressionKind
isAdded
isCategoryKnown
isCommented
isDoIt
isModified
isProtocolKnown
isRecategorized
isRemoved
isRenamed
isReorganized
item
Return the item that triggered the event (typically the name of a class, a category, a protocol, a method).
item:kind:
itemCategory
itemCategory:
itemChangeCombinations
itemClass
itemClass:
itemExpression
itemExpression:
itemKind
Return the kind of the item of the event (#category, #class, #protocol, #method, ...)
itemMethod
itemMethod:
itemProtocol
itemProtocol:
itemRequestor
itemRequestor:
itemSelector
itemSelector:
method:class:
method:protocol:class:
method:selector:class:
method:selector:class:requestor:
method:selector:protocol:class:
method:selector:protocol:class:requestor:
methodKind
new
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
protocolKind
supportedKinds
systemEvents
trigger:
Trigger the event manager.
AbstractLauncher
The class AutoStart in combination with the Launcher classes provides a mechanism for starting Squeak from the command line or a web page. Parameters on the command line or in the embed tag in the web page a parsed and stored in the lauchner's parameter dictionary.
Subclasses can access these parameters to determine what to do.
CommandLineLauncherExample provides an example for a command line application. if you start squeak with a command line 'class Integer' it will launch a class browser on class Integer.
To enable this execute
CommandLineLauncherExample activate
before you save the image.
To disable execute
CommandLineLauncherExample deactivate
The PluginLauchner is an example how to use this framework to start Squeak as a browser plugin. It looks for a parameter 'src' which should point to a file containing a squeak script.
activate
autoStarter
commandLine:
Start up this launcher from within Squeak as if it Squeak been launched the given command line.
deactivate
determineParameterNameFrom:
Determine which of the given alternate parameter names is actually used.
extractParameters
includesParameter:
Return if the parameter named parName exists.
numericParameterAtOneOf:ifAbsent:
Return the parameter named using one of the alternate names or an empty string
parameterAt:
Return the parameter named parName or an empty string
parameterAt:ifAbsent:
Return the parameter named parName.
Evaluate the block if parameter does not exist.
parameterAtOneOf:
Return the parameter named using one of the alternate names or an empty string
parameters
parameters:
startUp
A backstop for subclasses. Note that this is not a class message (most startUps are class messages).
AbstractSoundSystem
This is the abstract base class for a sound system. A sound system offers a small protocol for playing sounds and making beeps and works like a facade towards the rest of Squeak. A sound system is registered in the application registry SoundService and can be accessed by "SoundService default" like for example:
SoundService default playSoundNamed: 'croak'
The idea is that as much sound playing as possible should go through this facade. This way we decouple the sound system from the rest of Squeak and make it pluggable. It also is a perfect spot to check for the Preference class>>soundsEnabled.
Two basic subclasses exist at the time of this writing, the BaseSoundSystem which represents the standard Squeak sound system, and the DummySoundSystem which is a dummy implementation that can be used when there is no sound card available, or when the base sound system isn't in the image, or when you simply don't want to use the available sound card.
beep
Make a primitive beep.
playSampledSound:rate:
playSoundNamed:
playSoundNamed:ifAbsentReadFrom:
playSoundNamedOrBeep:
randomBitsFromSoundInput:
sampledSoundChoices
shutDown
Default is to do nothing.
soundNamed:
ActionSequence
An ActionSequence is an array that lists the object's dependant objects.
asActionSequence
asActionSequenceTrappingErrors
asMinimalRepresentation
printOn:
Append a sequence of characters that identify the receiver to aStream.
value
Answer the result of evaluating the elements of the receiver.
valueWithArguments:
AddedEvent
An AddedEvent is xxxxxxxxx.
Instance Variables
changeKind
isAdded
printEventKindOn:
supportedKinds
AppRegistry
AppRegistry is a simple little class, not much more than a wrapper around a collection. It's intended to help break dependencies between packages. For example, if you'd like to be able to send e-mail, you could use the bare-bones MailComposition class, or you could use the full-blown Celeste e-mail client. Instead of choosing one or the other, you can call "MailSender default" (where MailSender is a subclass of AppRegistry), and thus avoid creating a hard-coded dependency on either of the two mail senders.
This will only really be useful, of course, for applications that have a very simple, general, well-defined interface. Most of the time, you're probably better off just marking your package as being dependent on a specific other package, and avoiding the hassle of this whole AppRegistry thing. But for simple things like e-mail senders or web browsers, it might be useful.
appName
askForDefault
default
default:
defaultOrNil
register:
registeredClasses
removeObsolete
seeClassSide
All the code for AppRegistry is on the class side.
unregister:
Author
I am responsible for the full name used to identify the current code author.
fullName
Answer the full name to be used to identify the current code author.
fullName:
fullNamePerSe
Answer the currently-prevailing author full name, such as it is, empty or not
ifUnknownAuthorUse:during:
If no author is set use the name aString while executing aBlock.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initials
initials:
initialsPerSe
messagePrompt
new
requestFullName
requestInitials
requestName
reset
uniqueInstance
uniqueInstance:
AutoStart
An AutoStart is xxxxxxxxx.
Instance Variables
parameters: <Object>
parameters
- xxxxx
active
active:
addLauncher:
addLauncherFirst:
checkForPluginUpdate
checkForUpdates
deinstall
initialize
Subclasses should redefine this method to perform initializations on instance creation
installedLaunchers
processUpdates
removeLauncher:
shutDown:
startUp:
Beeper
Beeper provides simple audio (or in some other way) feedback to the user.
The recommended use is "Beeper beep" to give the user the equivalence of a beep. If you want to force the beep to use the primitive in the VM for beeping, then use "Beeper beepPrimitive". In either case, if sounds are disabled there will be no beep.
The actual beeping, when you use "Beeper beep", is done by sending a #play message to a registered playable object. You can register your own playable object by invoking the class side method #setDefault: passing in an object that responds to the #play message.
The default playable object is an instance of Beeper itself which implements #play on the instance side. That implementation delegates the playing of the beep to the default SoundService.
Note that #play is introduced as a common interface between AbstractSound and Beeper.
This way we can register instances of AbstractSound as playable entities, for example:
Beeper setDefault: (SampledSound new
setSamples: self coffeeCupClink
samplingRate: 12000).
Then "Beeper beep" will play the coffeeCup sound.
beep
beepPrimitive
clearDefault
default
newDefault
play
This is how the default Beeper makes a beep,
by sending beep to the default sound service.
The sound system will check if sounds are enabled.
primitiveBeep
setDefault:
BooleanPreferenceView
I am responsible for building the visual representation of a preference that accepts true and false values
handlesPanel:
initialize
Subclasses should redefine this method to perform initializations on instance creation
offerPreferenceNameMenu:with:in:
the user clicked on a preference name -- put up a menu
representativeButtonWithColor:inPanel:
Return a button that controls the setting of prefSymbol. It will keep up to date even if the preference value is changed in a different place
unload
BreakPoint
This exception is raised on executing a breakpoint.
"BreakPoint signal" is called from "Object>>break".
BreakpointManager
This class manages methods that include breakpoints.
It has several class methods to install and uninstall breakpoints.
Evaluating "BreakpointManager clear" will remove all installed breakpoints in the system.
Known issues:
- currently, only break-on-entry type of breakpoints are supported
- uninstalling the breakpoint doesn't auto-update other browsers
- uninstalling a breakpoint while debugging should restart-simulate the current method
Ernest Micklei, 2002
Send comments to emicklei@philemonworks.com
breakpointMethodSourceFor:in:
clear
compilePrototype:in:
installInClass:selector:
installed
methodHasBreakpoint:
testBreakpoint
unInstall:
CachedHTTPDownloadRequest
A CachedHTTPDownloadRequest is xxxxxxxxx.
Instance Variables
cachedName: <Object>
cachedName
- xxxxx
cachedName
cachedName:
startRetrieval
CachingCodeLoader
A CachingCodeLoader is xxxxxxxxx.
Instance Variables
cacheDir: <Object>
cacheDir
- xxxxx
cacheDir
cacheDir:
createRequestFor:in:
Create a URL request for the given string, which can be cached locally.
httpRequestClass
localCache:
localCacheDir:
ChangeRecord
A ChangeRecord represents a change recorded on a file in fileOut format.
It includes a type (more needs to be done here), and additional information
for certain types such as method defs which need class and category.
asMethodDefinition
category
class:category:method:sourceFiles:
This should be enough to find all the information for a method, or method deletion
file:position:type:
file:position:type:class:category:meta:stamp:
fileIn
File the receiver in. If I represent a method or a class-comment, file the method in and make a note of it in the recent-submissions list; if I represent a do-it, then, well, do it.
fileIndex
fileName
fileOutOn:
File the receiver out on the given file stream
headerFor:
isMetaClassChange
methodClass
methodClassName
methodSelector
originalChangeSetForSelector:
Returns the original changeset which contained this method version. If it is contained in the .sources file, return #sources. If it is in neither (e.g. its changeset was deleted), return nil. (The selector is passed in purely as an optimization.)
position
prior
readStamp
Get the time stamp of this method off the file
stamp
stamp:
string
text
timeStamp
Answer a TimeStamp that corresponds to my (text) stamp
type
ChangeSet
ChangeSets keep track of the changes made to a system, so they can be written on a file as source code (a "fileOut"). Every project has an associated changeSet. For simple projects, a different changeSet may be designated to capture changes at any time.
This implementation of ChangeSet is capable of remembering and manipulating methods for which the classes are not present in the system. However at the present time, this capability is not used in normal rearranging and fileOuts, but only for invoking and revoking associated with isolation layers.
For isolated projects (see Project class comment), the changeSet binding is semi-permanent. Every project exists in an isolation layer defined by its closest enclosing parent (or itself) that is isolated. If a project is not isolated, then changes reported to its designated changeSet must also be reported to the permanent changeSet for that layer, designated in the isolated project. This ensures that that outer project will be able to revert all changes upon exit.
Note that only certain changes may be reverted. Classes may not be added, removed, renamed or reshaped except in the layer in which they are defined because these operations on non-local classes are not revertable.
If a Squeak Project is established as being isolated, then its associated changeSet will be declared to be revertable. In this case all changes stored can be reverted. The changeSet associated with an isolated project is tied to that project, and cannot be edited in a changeSorter.
------
name - a String used to name the changeSet, and thus any associated project or fileOut.
preamble and postscript: two strings that serve as prefix (useful for documentation) and suffix (useful for doits) to the fileout of the changeSet.
revertable - a Boolean
If this variable is true, then all of the changes recorded by this changeSet can be reverted.
isolationSet - a ChangeSet or nil
The isolationSet is the designated changeSet for an isolation layer. If this changeSet is an isolationSet, then this variable will be nil. If not, then it points to the isolationSet for this layer, and all changes reported here will also be reported to the isolationSet.
isolatedProject - a Project or nil
If this is an isolationSet, then this variable points to the project with which it is associated.
changeRecords - Dictionary {class name -> a ClassChangeRecord}.
These classChangeRecords (qv) remember all of the system changes.
structures - Dictionary {#Rectangle -> #(<classVersionInteger> 'origin' 'corner')}.
Of the names of the instances variables before any changes for all classes in classChanges, and all of their superclasses. In the same format used in SmartRefStream. Inst var names are strings.
superclasses - Dictionary {#Rectangle -> #Object}.
Of all classes in classChanges, and all of their superclasses.
Structures and superclasses save the instance variable names of this class and all of its superclasses. Later we can tell how it changed and write a conversion method. The conversion method is used when old format objects are brought in from the disk from ImageSegment files (.extSeg) or SmartRefStream files (.obj .morph .bo .sp).
NOTE: It should be fairly simple, by adding a bit more information to the classChangeRecords, to reconstruct the information now stored in 'structures' and 'superclasses'. This would be a welcome simplification.
absorbClass:from:
Absorb into the receiver all the changes found in the class in the other change set.
*** Classes renamed in otherChangeSet may have problems
absorbMethod:class:from:
Absorb into the receiver all the changes for the method in the class in the other change set.
absorbStructureOfClass:from:
Absorb into the receiver all the structure and superclass info in the other change set. Used to write conversion methods.
addClass:
Include indication that a new class was created.
addCoherency:
SqR! 19980923: If I recreate the class then don't remove it
adoptSelector:forClass:
Adopt the given selector/class combination as a change in the receiver
allChangeSetNames
allChangeSets
allChangeSets:
allChangeSetsWithClass:selector:
askAddedInstVars:
Ask the author whether these newly added inst vars need to be non-nil
askRemovedInstVars:
Ask the author whether these newly removed inst vars need to have their info saved
askRenames:addTo:using:
Go through the renamed classes. Ask the user if it could be in a project. Add a method in SmartRefStream, and a conversion method in the new class.
assimilateAllChangesFoundIn:
Make all changes in otherChangeSet take effect on self as if they happened just now.
assurePostscriptExists
Make sure there is a StringHolder holding the postscript.
assurePreambleExists
Make sure there is a StringHolder holding the preamble; if it's found to have reverted to empty contents, put up the template
assuredChangeSetNamed:
atClass:add:
atClass:includes:
atSelector:class:
atSelector:class:put:
author
basicNewChangeSet:
basicNewNamed:
beIsolationSetFor:
browseChangedMessages
buildAggregateChangeSet
buildMessageForMailOutWithUser:
prepare the message
changeClass:from:
Remember that a class definition has been changed. Record the original structure, so that a conversion method can be built.
changeRecorderFor:
changeSet:containsClass:
changeSetsNamedSuchThat:
changed:with:
Allow objects to depend on the ChangeSet class instead of a particular instance
of ChangeSet (which may be switched using projects).
changedClassNames
Answer a OrderedCollection of the names of changed or edited classes.
DOES include removed classes. Sort alphabetically.
changedClasses
Answer an OrderedCollection of changed or edited classes.
Does not include removed classes. Sort alphabetically by name.
changedMessageList
Used by a message set browser to access the list view information.
changedMessageListAugmented
Even added classes have all messages in changedMessageList.
checkForAlienAuthorship
Check to see if there are any methods in the receiver that have author full name other than that of the current author, and open a browser on all found
checkForAnyAlienAuthorship
Check to see if there are any versions of any methods in the receiver that have author full name other than that of the current author, and open a browser on all found
checkForConversionMethods
See if any conversion methods are needed
checkForSlips
Return a collection of method refs with possible debugging code in them.
checkForUnclassifiedMethods
Open a message list browser on all methods in the current change set that have not been categorized,
checkForUncommentedClasses
Check to see if any classes involved in this change set do not have class comments. Open up a browser showing all such classes.
checkForUncommentedMethods
Check to see if there are any methods in the receiver that have no comments, and open a browser on all found
checkForUnsentMessages
Check the change set for unsent messages, and if any are found, open
up a message-list browser on them
chooseSubjectPrefixForEmail
classChangeAt:
Return what we know about class changes to this class.
classRemoves
clear
Reset the receiver to be empty.
commentClass:
Include indication that a class comment has been changed.
compileAll:from:
If I have changes for this class, recompile them
containsClass:
containsMethodAtPosition:
Answer whether the receiver contains the method logged at the given file position
convertApril2000:using:
These variables are automatically stored into the new instance:
('name' 'preamble' 'postscript' 'structures' 'superclasses' ).
This method is for additional changes.
It initializes the isolation variables, and then duplicates the logic fo
assimilateAllChangesFoundIn:.
countOfChangeSetsWithClass:andSelector:
current
currentChangeSetString
defaultChangeSetDirectory
defaultChangeSetDirectory:
defaultName
deleteChangeSetsNumberedLowerThan:
doWeFileOut:given:cache:
doesAnyChangeSetHaveClass:andSelector:
editPostscript
edit the receiver's postscript, in a separate window.
editPreamble
edit the receiver's preamble, in a separate window.
event:
Hook for SystemChangeNotifier
existingOrNewChangeSetNamed:
expungeEmptyClassChangeEntries
fatDefForClass:
fileIntoNewChangeSet:
fileOut
File out the receiver, to a file whose name is a function of the
change-set name and a unique numeric tag.
fileOutChangeSetsNamed:
fileOutChangesFor:on:
Write out all the method changes for this class.
fileOutClassDefinition:on:
Write out class definition for the given class on the given stream, if the class definition was added or changed.
fileOutOn:
Write out all the changes the receiver knows about
fileOutPSFor:on:
Write out removals and initialization for this class.
fileOutPostscriptOn:
If the receiver has a postscript, put it out onto the stream.
fileOutPreambleOn:
If the receiver has a preamble, put it out onto the stream.
fileReaderServicesForFile:suffix:
forgetAllChangesFoundIn:
Remove from the receiver all method changes found in aChangeSet. The intention is facilitate the process of factoring a large set of changes into disjoint change sets. To use: in a change sorter, copy over all the changes you want into some new change set, then use the subtract-other-side feature to subtract those changes from the larger change set, and continue in this manner.
forgetChangesForClass:in:
See forgetAllChangesFoundIn:. Used in culling changeSets.
gatherChangeSets
getRecentLocatorWithPrompt:
hasAnyChangeForSelector:
Answer whether the receiver has any change under the given selector, whether it be add, change, or remove, for any class
hasPostscript
hasPreamble
highestNumberedChangeSet
initialize
Initialize the receiver to be empty.
invoke
Do the first part of the invoke operation -- no particular hurry.
isEmpty
Answer whether the receiver contains any elements.
isMoribund
Answer whether the receiver is obsolete and about to die; part of an effort to get such guys cleared out from the change sorter. 2/7/96 sw
isolatedProject
Return the isolated project for which I am the changeSet.
isolationSet:
lookForSlips
Scan the receiver for changes that the user may regard as slips to be remedied
mailOut
Email a compressed version of this changeset to the squeak-dev list, so that it can be shared with everyone. (You will be able to edit the email before it is sent.)
messageListForChangesWhich:ifNone:
methodChanges
methodChangesAtClass:
Return an old-style dictionary of method change types.
methodInfoFromRemoval:
methodsWithAnyInitialsOtherThan:
Return a collection of method refs whose author appears to be different from the given one, even historically
methodsWithInitialsOtherThan:
Return a collection of method refs whose author appears to be different from the given one
methodsWithoutClassifications
Return a collection representing methods in the receiver which have not been categorized
methodsWithoutComments
Return a collection representing methods in the receiver which have no precode comments
mostRecentChangeSetWithChangeForClass:selector:
name
The name of this changeSet.
2/7/96 sw: If name is nil, we've got garbage. Help to identify.
name:
named:
new
newChangeSet
newChangeSet:
newChanges:
newChangesFromStream:named:
noChanges
noteClassForgotten:
Remove from structures if class is not a superclass of some other one we are remembering
noteClassStructure:
Save the instance variable names of this class and all of its superclasses. Later we can tell how it changed and write a conversion method. The conversion method is used when old format objects are brought in from the disk from ImageSegment files (.extSeg) or SmartRefStream files (.obj .morph .bo .sp).
noteNewMethod:forClass:selector:priorMethod:
noteRemovalOf:
The class is about to be removed from the system.
Adjust the receiver to reflect that fact.
objectForDataStream:
I am about to be written on an object file. Write a path to me in the other system instead.
okayToRemove
okayToRemoveInforming:
Answer whether it is okay to remove the receiver. If aBoolean is true, inform the receiver if it is not okay
oldNameFor:
postscript
Answer the string representing the postscript.
postscript:
Answer the string representing the postscript.
postscriptHasDependents
postscriptString
Answer the string representing the postscript.
postscriptString:
Establish aString as the new contents of the postscript.
preamble
Answer the string representing the preamble
preamble:
Establish aString as the new contents of the preamble.
preambleString
Answer the string representing the preamble
preambleString:
Establish aString as the new contents of the preamble.
preambleTemplate
Answer a string that will form the default contents for a change set's preamble.
Just a first stab at what the content should be.
printOn:
2/7/96 sw: provide the receiver's name in the printout
printOnStream:
2/7/96 sw: provide the receiver's name in the printout
promoteToTop:
promptForDefaultChangeSetDirectoryIfNecessary
removeChangeSet:
removeChangeSetsNamedSuchThat:
removeClassAndMetaClassChanges:
Remove all memory of changes associated with this class and its metaclass. 7/18/96 sw
removeClassChanges:
Remove all memory of changes associated with this class
removeEmptyUnnamedChangeSets
removePostscript
removePreamble
removeSelector:class:priorMethod:lastMethodInfo:
Include indication that a method has been forgotten.
info is a pair of the source code pointer and message category
for the method that was removed.
removeSelectorChanges:class:
Remove all memory of changes associated with the argument, selector, in
this class.
renameClass:from:to:
Include indication that a class has been renamed.
reorganizeClass:
Include indication that a class was reorganized.
resetCurrentToNewUnnamedChangeSet
revoke
Do the first part of the revoke operation -- this must be very simple.
scanCategory:
scanFile:category:class:meta:stamp:
scanFile:from:to:
scanVersionsOf:class:meta:category:selector:
secondaryChangeSet
selectorsInClass:
Used by a ChangeSorter to access the list methods.
serviceFileIntoNewChangeSet
services
setPreambleToSay:
Make aString become the preamble of this change set
structures
summaryString
Answer the string summarizing this changeSet
summaryStringDelta:
Answer the string summarizing this changeSet
superclassOrder:
superclasses
traitsOrder:
trimHistory
Drop non-essential history: methods added and then removed, as well as rename and reorganization of newly-added classes.
uninstall
uniqueNameLike:
verboseFileOut
File out the receiver, to a file whose name is a function of the change-set name and either of the date & time or chosen to have a unique numeric tag, depending on the preference 'changeSetVersionNumbers'
veryDeepCopyWith:
Return self; this is NOT the way to launch new change sets! Having this method here allows Change Sorters to be in parts bins
wither
The receiver is to be clobbered. Clear it out. 2/7/96 sw
zapHistory
Much stronger than trimHistory, but it should still leave the changeSet in good shape.
Must not be done on revertable changeSets
ChangeSet allInstancesDo: [:cs | cs zapHistory].
ChangesOrganizer
Changes organizer
allChangeSetNames
allChangeSets
allChangeSetsWithClass:selector:
assuredChangeSetNamed:
basicNewChangeSet:
belongsInAdditions:
belongsInAll:
belongsInMyInitials:
belongsInNumbered:
belongsInProjectsInRelease:
belongsInRecentUpdates:
buildAggregateChangeSet
changeSet:containsClass:
changeSetCategoryNamed:
changeSetNamed:
changeSetNamesInReleaseImage
changeSetNamesInThreeOh
changeSetsNamedSuchThat:
countOfChangeSetsWithClass:andSelector:
deleteChangeSetsNumberedLowerThan:
doesAnyChangeSetHaveClass:andSelector:
existingOrNewChangeSetNamed:
fileOutChangeSetsNamed:
gatherChangeSets
highestNumberedChangeSet
initialization
initializeChangeSetCategories
mostRecentChangeSetWithChangeForClass:selector:
newChangeSet
newChangeSet:
newChangesFromStream:named:
promoteToTop:
recentUpdateMarker
recentUpdateMarker:
removeChangeSet:
removeChangeSetsNamedSuchThat:
removeEmptyUnnamedChangeSets
reorderChangeSets
secondaryChangeSet
ClassChangeRecord
A ClassChangeRecorder keeps track of most substantive changes premissible in a project, isolated or not.
Structure:
inForce a boolean
Tells whether these changes are in effect.
true for all changeSets in and above the current project.
It should be sufficient only to record this for the changeSet
as a whole, but this redundancy could help in error recovery.
classIsLocal a boolean
True if and only if this class is defined in this layer of the
project structure.
changeTypes an identitySet
Summarizes which changes have been made in this class.
Values include #comment, #reorganize, #rename,
and the four more summarized below.
thisName a string
Retains the class name for this layer.
priorName a string
Preserves the prior name.
thisComment a text
Retains the class comment for this layer.
priorComment a text
Preserves the prior comment.
thisOrganization a classOrganizer
Retains the class organization for this layer.
priorOrganization a classOrganizer
Preserves the prior organization.
thisMD a methodDictionary
Used to prepare changes for nearly atomic invocation
of this layer (see below).
priorMD a methodDictionary
Preserves the state of an altered class as it exists in the next
outer layer of the project structure.
methodChanges a dictionary of classChangeRecords
Retains all the method changes for this layer.
Four of the possible changeTypes are maintained in a mutually exclusive set, analogously to MethodChangeRecords. Here is a simple summary of the relationship between these four changeType symbols and the recording of prior state
| prior == nil | prior not nil
--------- |---------------------------- |--------------------
add | add | change
--------- |---------------------------- |--------------------
remove | addedThenRemoved | remove
A classChangeRecorder is notified of changes by the method
noteMethodChange: <ClassChangeRecord>.
ClassChangeRecorders are designed to invoke a set of changes relative to the definition of a class in an prior layer. It is important that both invocation and revocation of these changes take place in a nearly atomic fashion so that interdependent changes will be adopted as a whole, and so that only one flush of the method cache should be necessary. A further reason for revocation to be simple is that it may be requested as an attempt to recover from an error in a project that is failing.
allChangeTypes
assimilateAllChangesIn:
atSelector:ifAbsent:
atSelector:put:
changedSelectors
Return a set of the changed or removed selectors.
checkCoherence
If I recreate the class then don't remove it
compileAll:from:
Something about this class has changed. Locally retained methods must be recompiled.
NOTE: You might think that if this changeSet is in force, then we can just note
the new methods but a lower change set may override and be in force which
would mean that only the overriding copies go recompiled. Just do it.
findOrMakeMethodChangeAt:priorMethod:
forgetChangesIn:
See forgetAllChangesFoundIn:. Used in culling changeSets.
forgetClassRemoval
hasNoChanges
includesChangeType:
infoFromRemoval:
initFor:revertable:
invokePhase1
invokePhase2
isClassRemoval
NOTE: there are other removals with changeType #addedThenRemoved,
but this message is used to write out removals in fileOut, and those
cases should not be written out.
methodChangeTypes
Return an old-style dictionary of method change types.
methodChanges
noteChangeType:
noteChangeType:fromClass:
noteNewMethod:selector:priorMethod:
noteNewName:
notePriorDefinition:
noteRemoveSelector:priorMethod:lastMethodInfo:
priorDefinition
priorName
realClass
Return the actual class (or meta), as determined from my name.
removeSelector:
Remove all memory of changes associated with the argument, selector, in this class.
revokePhase1
revokePhase2
thisName
trimHistory
Drop non-essential history.
zapHistory
Drop all recorded information not needed to simply keep track of what has been changed.
Saves a lot of space.
ClassDiffBuilder
A ClassDiffBuilder is xxxxxxxxx.
Instance Variables
printPatchSequence:on:
split:
Clipboard
The Clipboard class is the abstract superclass for the concrete platform specific clipboard. The legacy clipboard support using the VM supplied primitives was moved to SqueakClipboard.
The Clipboard implements a basic buffering scheme for text. The currently selected text is also exported to the OS so that text can be copied from and to other applications. Commonly only a single instance is used (the default clipboard) but applications are free to use other than the default clipboard if necessary.
chooseRecentClipping
Clipboard chooseRecentClipping
clipboardText
Return the text currently in the clipboard. If the system clipboard is empty, or if it differs from the Smalltalk clipboard text, use the Smalltalk clipboard. This is done since (a) the Mac clipboard gives up on very large chunks of text and (b) since not all platforms support the notion of a clipboard.
clipboardText:
default
initialize
Subclasses should redefine this method to perform initializations on instance creation
noteRecentClipping:
Keep most recent clippings in a queue for pasteRecent (paste... command)
primitiveClipboardText
Get the current clipboard text. Return the empty string if the primitive fails.
primitiveClipboardText:
Set the current clipboard text to the given string.
shutDown:
startUp:
CodeDiffBuilder
I am a differencer that compares source in tokens tokenised by a parser. I consider comments significant, but consider sequences of whitespace equivalent. Depending on the definition of WhitespaceForCodeDiff>>at: sequences of whitespace containing carriage-returns may be considered different to sequences of whitespace lacking carriage-returns (which may result in better-formatted diffs).
CodeLoader
CodeLoader provides a simple facility for loading code from the network.
Examples:
| loader |
loader _ CodeLoader new.
loader baseURL:'http://isgwww.cs.uni-magdeburg.de/~raab/test/'.
loader localCache: #('.cache' 'source').
"Sources and segments can be loaded in parallel"
loader loadSourceFiles: #('file1.st' 'file2.st.gz').
loader localCache: #('.cache' 'segments').
loader loadSegments: #('is1.extseg' 'is2.extseg.gz').
"Install sources first - will wait until the files are actually loaded"
loader installSourceFiles.
"And then the segments"
loader installSegments.
baseURL
baseURL:
compressFileNamed:
compressFileNamed:in:
createRequestFor:in:
Create a URL request for the given string, which can be cached locally.
defaultBaseURL
defaultBaseURL:
defaultKey
defaultKey:
exportCategories:to:
exportCategoryNamed:
exportClassesNamed:to:
exportCodeSegment:classes:keepSource:
httpRequestClass
initialize
Subclasses should redefine this method to perform initializations on instance creation
installProject
Assume that we're loading a single file and it's a project
installSegment:
Install the previously loaded segment
installSegments
Install the previously loaded segments
installSourceFile:
Install the previously loaded source file
installSourceFiles
Install the previously loaded source files
loadCode:from:ifClassNotLoaded:
loadCodeSegment:
loadSegments:
Load all the source files in the given array.
loadSourceFiles:
Load all the source files in the given array.
publicKey
publicKey:
signFile:renameAs:key:dsa:
signFiles:in:key:
signFiles:key:
signFilesFrom:to:key:
verifySignedFileNamed:
ColorTheme
A ColorTheme is xxxxxxxxx.
Instance Variables
baseColors
cancelColor
current
dialog3DTitles
dialogBorderColor
dialogBorderWidth
dialogButtonBorderWidth
dialogColor
dialogPaneBorderColor
dialogPaneBorderWidth
dialogPaneRampOrColor
dialogRampOrColor
dockingBarAutoGradient
dockingBarColor
dockingBarGradientRamp
helpColor
menuBorderColor
menuBorderWidth
menuColor
menuLineColor
menuSelectionColor
menuTitleBorderColor
menuTitleBorderWidth
menuTitleColor
normal:
okColor
CommandLineLauncherExample
CommandLineLauncherExample provides an example for a command line application. if you start squeak with a command line 'class Integer' it will launch a class browser on class Integer.
To enable this execute
CommandLineLauncherExample activate
before you save the image.
To disable execute
CommandLineLauncherExample deactivate
startUp
A backstop for subclasses. Note that this is not a class message (most startUps are class messages).
CommentedEvent
A CommentedEvent is xxxxxxxxx.
Instance Variables
newComment: <Object>
newStamp: <Object>
oldComment: <Object>
oldStamp: <Object>
newComment
- xxxxx
newStamp
- xxxxx
oldComment
- xxxxx
oldStamp
- xxxxx
changeKind
class:oldComment:newComment:
class:oldComment:newComment:oldStamp:newStamp:
isCommented
newComment
newComment:
newStamp
newStamp:
oldComment
oldComment:
oldStamp
oldStamp:
printEventKindOn:
supportedKinds
DataStream
This is the save-to-disk facility. A DataStream can store one or more objects in a persistent form.
To handle objects with sharing and cycles, you must use a
ReferenceStream instead of a DataStream. (Or SmartRefStream.) ReferenceStream is typically
faster and produces smaller files because it doesn't repeatedly write the same Symbols.
Here is the way to use DataStream and ReferenceStream:
rr _ ReferenceStream fileNamed: 'test.obj'.
rr nextPut: <your object>.
rr close.
To get it back:
rr _ ReferenceStream fileNamed: 'test.obj'.
<your object> _ rr next.
rr close.
Each object to be stored has two opportunities to control what gets stored. On the high level, objectToStoreOnDataStream allows you to substitute another object on the way out. The low level hook is storeDataOn:. The read-in counterparts to these messages are comeFullyUpOnReload and (class) readDataFrom:size:. See these methods, and the class DiskProxy, for more information about externalizing and internalizing.
NOTE: A DataStream should be treated as a write-stream for writing. It is a read-stream for reading. It is not a ReadWriteStream.
atEnd
Answer true if the stream is at the end.
beginInstance:size:
This is for use by storeDataOn: methods.
Cf. Object>>storeDataOn:.
beginReference:
We're starting to read anObject. Remember it and its reference
position (if we care; ReferenceStream cares). Answer the
reference position.
byteStream
close
Close the stream.
contents
Answer all of the contents of the receiver.
errorWriteReference:
PRIVATE -- Raise an error because this case of nextPut:'s perform:
shouldn't be called. -- 11/15/92 jhm
example
exampleWithPictures
fileNamed:
flush
Guarantee that any writes to me are actually recorded on disk. -- 11/17/92 jhm
getCurrentReference
PRIVATE -- Return the currentReference posn.
Overridden by ReferenceStream.
initialize
Subclasses should redefine this method to perform initializations on instance creation
maybeBeginReference:
Do nothing. See ReferenceStream|maybeBeginReference:
new
newFileNamed:
next
Answer the next object in the stream.
next:
Answer an Array of the next anInteger objects in the stream.
nextAndClose
Speedy way to grab one object. Only use when we are inside an object binary file. Do not use for the start of a SmartRefStream mixed code-and-object file.
nextPut:
Write anObject to the receiver stream. Answer anObject.
nextPutAll:
Write each of the objects in aCollection to the
receiver stream. Answer aCollection.
noteCurrentReference:
PRIVATE -- If we support references for type typeID, remember
the current byteStream position so we can add the next object to
the 'objects' dictionary, and return true. Else return false.
This method is here to be overridden by ReferenceStream
objectAt:
PRIVATE -- Read & return the object at a given stream position. 08:18 tk anInteger is a relative file position.
objectIfBlocked:
We don't do any blocking
oldFileNamed:
on:
outputReference:
PRIVATE -- Output a reference to the object at integer stream position referencePosn (relative to basePos). To output a weak reference to an object not yet written, supply (self vacantRef) for referencePosn.
project
readArray
PRIVATE -- Read the contents of an Array.
We must do beginReference: here after instantiating the Array
but before reading its contents, in case the contents reference
the Array. beginReference: will be sent again when we return to
next, but that's ok as long as we save and restore the current
reference position over recursive calls to next.
readBitmap
PRIVATE -- Read the contents of a Bitmap.
readBoolean
PRIVATE -- Read the contents of a Boolean.
This is here only for compatibility with old data files.
readByteArray
PRIVATE -- Read the contents of a ByteArray.
readClass
Should never be executed because a DiskProxy, not a clas comes in.
readFalse
PRIVATE -- Read the contents of a False.
readFloat
PRIVATE -- Read the contents of a Float.
This is the fast way to read a Float.
We support 8-byte Floats here. Non-IEEE
readFloatString
PRIVATE -- Read the contents of a Float string.
This is the slow way to read a Float--via its string rep'n.
It's here for compatibility with old data files.
readInstance
PRIVATE -- Read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Let the instance, not the class read the data.
readInteger
PRIVATE -- Read the contents of a SmallInteger.
readMethod
PRIVATE -- Read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Let the instance, not the class read the data.
readNil
PRIVATE -- Read the contents of an UndefinedObject.
readRectangle
Read a compact Rectangle. Rectangles with values outside +/- 2047 were stored as normal objects (type=9). They will not come here. 17:22 tk
readReference
Read the contents of an object reference. (Cf. outputReference:) File is not now positioned at this object.
readShortInst
Read the contents of an arbitrary instance that has a short header.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Let the instance, not the class read the data.
readShortRef
Read an object reference from two bytes only. Original object must be in first 65536 bytes of the file. Relative to start of data. vacantRef not a possibility.
readString
readStringOld
readSymbol
PRIVATE -- Read the contents of a Symbol.
readTrue
PRIVATE -- Read the contents of a True.
readUser
Reconstruct both the private class and the instance. Still used??
readWordArray
PRIVATE -- Read the contents of a WordArray.
readWordArrayForSegment
Read the contents of a WordArray ignoring endianness.
readWordLike
Can be used by any class that is bits and not bytes (WordArray, Bitmap, SoundBuffer, etc).
replace:with:
We may wish to remember that in some field, the original object is being replaced by the proxy. For the hybred scheme that collects with a DummyStream and writes an ImageSegment, it needs to hold onto the originals so they will appear in outPointers, and be replaced.
reset
Reset the stream.
rootObject
Return the object at the root of the tree we are filing out.
rootObject:
Return the object at the root of the tree we are filing out.
setCurrentReference:
PRIVATE -- Set currentReference to refPosn.
Noop here. Cf. ReferenceStream.
setStream:
PRIVATE -- Initialization method.
setStream:reading:
PRIVATE -- Initialization method.
size
Answer the stream's size.
streamedRepresentationOf:
testWith:
tryToPutReference:typeID:
PRIVATE -- If we support references for type typeID, and if
anObject already appears in my output stream, then put a
reference to the place where anObject already appears. If we
support references for typeID but didn't already put anObject,
then associate the current stream position with anObject in
case one wants to nextPut: it again.
Return true after putting a reference; false if the object still
needs to be put.
For DataStream this is trivial. ReferenceStream overrides this.
typeIDFor:
Return the typeID for anObject's class. This is where the tangle of objects is clipped to stop everything from going out.
Classes can control their instance variables by defining objectToStoreOnDataStream.
Any object in blockers is not written out. See ReferenceStream.objectIfBlocked: and DataStream nextPut:.
Morphs do not write their owners. See Morph.storeDataOn: Each morph tells itself to 'prepareToBeSaved' before writing out.
unStream:
vacantRef
Answer the magic 32-bit constant we use ***ON DISK*** as a stream 'reference
position' to identify a reference that's not yet filled in. This must be a
value that won't be used as an ordinary reference. Cf. outputReference: and
readReference. --
NOTE: We could use a different type ID for vacant-refs rather than writing
object-references with a magic value. (The type ID and value are
overwritten by ordinary object-references when weak refs are fullfilled.)
writeArray:
PRIVATE -- Write the contents of an Array.
writeBitmap:
PRIVATE -- Write the contents of a Bitmap.
writeBoolean:
PRIVATE -- Write the contents of a Boolean.
This method is now obsolete.
writeByteArray:
PRIVATE -- Write the contents of a ByteArray.
writeClass:
Write out a DiskProxy for the class. It will look up the class's name in Smalltalk in the new sustem. Never write classes or methodDictionaries as objects. For novel classes, front part of file is a fileIn of the new class.
writeFalse:
PRIVATE -- Write the contents of a False.
writeFloat:
PRIVATE -- Write the contents of a Float.
We support 8-byte Floats here.
writeFloatString:
PRIVATE -- Write the contents of a Float string.
This is the slow way to write a Float--via its string rep'n.
writeInstance:
PRIVATE -- Write the contents of an arbitrary instance.
writeInteger:
PRIVATE -- Write the contents of a SmallInteger.
writeNil:
PRIVATE -- Write the contents of an UndefinedObject.
writeRectangle:
Write the contents of a Rectangle. See if it can be a compact Rectangle (type=15). Rectangles with values outside +/- 2047 were stored as normal objects (type=9). 17:22 tk
writeString:
PRIVATE -- Write the contents of a String.
writeStringOld:
PRIVATE -- Write the contents of a String.
writeSymbol:
PRIVATE -- Write the contents of a Symbol.
writeTrue:
PRIVATE -- Write the contents of a True.
writeUser:
Write the contents of an arbitrary User instance (and its devoted class).
writeWordLike:
Note that we put the class name before the size.
DeepCopier
DeepCopier does a veryDeepCopy.
It is a complete tree copy using a dictionary. Any object that is in the tree twice is only copied once. All references to the object in the copy of the tree will point to the new copy. See Object|veryDeepCopy which calls (self veryDeepCopyWith: aDeepCopier).
When a tree of morphs points at a morph outside of itself, that morph should not be copied. Use our own kind of weak pointers for the 'potentially outside' morphs. Default is that any new class will have all of its fields deeply copied. If a field needs to be weakly copied, define veryDeepInner: and veryDeepFixupWith:.
veryDeepInner: has the loop that actually copies the fields. If a class defines its own copy of veryDeepInner: (to leave some fields out), then veryDeepFixupWith: will be called on that object at the end. veryDeepInner: can compute an alternate object to put in a field. (Object veryDeepCopyWith: discovers which superclasses did not define veryDeepInner:, and very deeply copies the variables defined in those classes).
To decide if a class needs veryDeepInner: and veryDeepFixupWith:, ask this about an instance: If I duplicate this object, does that mean that I also want to make duplicates of the things it holds onto? If yes, (i.e. a Paragraph does want a new copy of its Text) then do nothing. If no, (i.e. an undo command does not want to copy the objects it acts upon), then define veryDeepInner: and veryDeepFixupWith:.

Here is an analysis for the specific case of a morph being held by another morph.
Does field X contain a morph (or a Player whose costume is a morph)? If not, no action needed.
Is the morph in field X already a submorph of the object? Is it down lower in the submorph tree?
If so, no action needed.
Could the morph in field X every appear on the screen (be a submorph of some other morph)?
If not, no action needed.
If it could, you must write the methods veryDeepFixupWith: and veryDeepInner:, and in them, refrain from sending veryDeepCopyWith: to the contents of field X.
----- Things Ted is still considering -----
Rule: If a morph stores a uniClass class (Player 57) as an object in a field, the new uniClass will not be stored there. Each uniClass instance does have a new class created for it. (fix this by putting the old class in references and allow lookup? Wrong if encounter it before seeing an instance?)
Rule: If object A has object C in a field, and A says (^ C) for the copy, but object B has A in a normal field and it gets deepCopied, and A in encountered first, then there will be two copies of C. (just be aware of it)
Dependents are now fixed up. Suppose a model has a dependent view. In the DependentFields dictionary, model -> (view ...).
If only the model is copied, no dependents are created (no one knows about the new model).
If only the view is copied, it is inserted into DependentFields on the right side. model -> (view copiedView ...).
If both are copied, the new model has the new view as its dependent.
If additional things depend on a model that is copied, the caller must add them to its dependents.
checkBasicClasses
Check that no indexes of instance vars have changed in certain classes. If you get an error in this method, an implementation of veryDeepCopyWith: needs to be updated. The idea is to catch a change while it is still in the system of the programmer who made it.
DeepCopier new checkVariables
checkClass:
Check that no indexes of instance vars have changed in certain classes. If you get an error in this method, an implementation of veryDeepCopyWith: needs to be updated. The idea is to catch a change while it is still in the system of the programmer who made it.
checkDeep
Write exceptions in the Transcript. Every class that implements veryDeepInner: must copy all its inst vars. Danger is that a user will add a new instance variable and forget to copy it. This check is only run by hand once in a while to make sure nothing was forgotten.
(Please do not remove this method.)
DeepCopier new checkDeep
checkVariables
Check that no indexes of instance vars have changed in certain classes. If you get an error in this method, an implementation of veryDeepCopyWith: needs to be updated. The idea is to catch a change while it is still in the system of the programmer who made it.
DeepCopier new checkVariables
fixDependents
They are not used much, but need to be right
initialize
Subclasses should redefine this method to perform initializations on instance creation
initialize:
intervalForChecks
set delay interval for checking for new instance variables to 10 minutes. hg 11/23/1999
isItTimeToCheckVariables
objInMemory:
Test if this global is in memory and return it if so.
references
warnIverNotCopiedIn:sel:
Warn the user to update veryDeepCopyWith: or veryDeepInner:
DefaultExternalDropHandler
An alternative default handler that uses the file-list services to process files.
chooseServiceFrom:
private - choose a service from aCollection asking the user if
needed
handle:in:dropEvent:
the file was just droped, let's do our job
initialize
Subclasses should redefine this method to perform initializations on instance creation
servicesForFileNamed:
private - answer a collection of file-services for the file named
aString
unload
unwantedSelectors
private - answer a collection well known unwanted selectors
DigitalSignatureAlgorithm
This class implements the Digital Signature Algorithm (DSA) of the U.S. government's "Digital Signature Standard" (DSS). The DSA algorithm was proposed in 1991 and became a standard in May 1994. The official description is available as a Federal Information Processing Standards Publication (FIPS PUB 186, May 19, 1994). A companion standard, the Secure Hash Standard, or SHS (FIPS PUB 180-1, April 17, 1995), describes a 160-bit message digest algorithm known as the Secure Hash Algorithm (SHA). This message digest is used to compute the document signature.
Here's how to use it:
1. The "signer" creates a pair of keys. One of these must be kept private. The other may be freely distributed. For example, it could be built into the signature checking code of an application.
2. When the signer wishes to sign a packet of data (a "message") , he uses the secure hash algorithm to create a 160-bit message digest (hash) which is used as the input to DSA. The result of this is a pair of large numbers called a "signature" that is attached to the original message.
3. When someone receives a signed message purported to have come from the signer, they compute the 160-bit hash of the message and pass that, along with the message signature and the signer's public key, to the signature verification algorithm. If the signature checks, then it is virtually guaranteed that the message originated from someone who had the signer's private key. That is, the message is not a forgery and has not been modified since it was signed. For example, if the message contains a program, and the recipient trusts the signer, then the recipient can run the program with the assurance that it won't do anything harmful. (At least, not intentionally. A digital signature is no guarantee against bugs! :->)
The signer must keep the private key secure, since anyone who has the private key can forge the signer's signature on any message they like. As long as the secret key is not stolen, cryptographers believe it to be virtually impossible either to forge a signature, to find a message that matches an existing sigature, or to discover the signer's private key by analyzing message signatures. Knowing the public key (which, for example, could be recovered from an application that had it built in), does not weaken the security at all.
An excellent reference work on digital signatures and cryptography in general is:
Schneier, Bruce
"Applied Cryptography: Protocols, Algorithms, and Source Code in C"
John Wiley and Sons, 1996.
I used this book as a guide to implementing many of the numerical algorithms required by DSA.
Patents and Export Restrictions:
Many digital signature technologies are patented. DSA is also patented, but the patent is owned by the U.S. government which has made DSA available royalty-free. There is a claim that the government patent infringes on an earlier patent by Schnorr, but the government is requiring the use of DSA, so they apparently believe this claim is not strong enough to be a serious threat to their own patent.
Most cryptography technology, including digital signature technology, requires an export license for it to be distributed outside the U.S. Recent legislation may have relaxed the export license requirements, but it would be prudent to check the current regulations before exporting this code.
computeSignatureForMessageHash:privateKey:
Answer the digital signature of the given message hash using the given private key. A signature is a pair of large integers. The private key is an array of four large integers: (p, q, g, x).
example
generateKeySet
Generate and answer a key set for DSA. The result is a pair (<private key><public key>). Each key is an array of four large integers. The private key is (p, q, g, x); the public one is (p, q, g, y). The signer must be sure to record (p, q, g, x), and must keep x secret to prevent someone from forging their signature.
generateQandP
Generate the two industrial-grade primes, q (160-bits) and p (512-bit) needed to build a key set. Answer the array (q, p, s), where s is the seed that from which q and p were created. This seed is normally discarded, but can be used to verify the key generation process if desired.
generateRandomLength:s:n:
Answer a random number of bitLength bits generated using the secure hash algorithm.
generateSandQ
Generate a 160-bit random seed s and an industrial grade prime q.
initRandom:
Initialize the the secure random number generator with the given value. The argument should be a positive integer of up to 512 bits chosen randomly to avoid someone being able to predict the sequence of random values generated.
initRandomFromString:
Ask the user to type a long random string and use the result to seed the secure random number generator.
initRandomFromUser
Ask the user to type a long random string and use the result to seed the secure random number generator.
initRandomNonInteractively
initialize
Subclasses should redefine this method to perform initializations on instance creation
inverseOf:mod:
Answer the inverse of x modulus n. That is, the integer y such that (x * y) \\ n is 1. Both x and n must be positive, and it is assumed that x < n and that x and n are integers.
isProbablyPrime:
Answer true if p is prime with very high probability. Such a number is sometimes called an 'industrial grade prime'--a large number that is so extremely likely to be prime that it can assumed that it actually is prime for all practical purposes. This implementation uses the Rabin-Miller algorithm (Schneier, p. 159).
logOfLargestPowerOfTwoDividing:
Answer the base-2 log of the largest power of two that divides the given integer. For example, the largest power of two that divides 24 is 8, whose log base-2 is 3. Do this efficiently even when the given number is a large integer. Assume that the given integer is > 0.
nextRandom160
Answer a newly generated 160-bit random number in the range [1..(2^160 - 1)].
sign:privateKey:
sign:privateKey:dsa:
signatureToString:
Answer a string representation of the given signature. This string can be parsed using the stringToSignature: method.
stringToSignature:
Answer the signature stored in the given string. A signature string has the format:
'[DSA digital signature <r> <s>]'
where <r> and <s> are large positive integers represented by strings of hexidecimal digits.
testExamplesFromDisk
testKeySet
time:as:count:
timeDecode:
timeDirect:as:count:
verify:isSignatureOf:publicKey:
verifySignature:ofMessageHash:publicKey:
Answer true if the given signature is the authentic signature of the given message hash. That is, if the signature must have been computed using the private key set corresponding to the given public key. The public key is an array of four large integers: (p, q, g, y).
writeExamplesToDisk
DiskProxy
A DiskProxy is an externalized form of an object to write on a
DataStream. It contains a "constructor" message to regenerate
the object, in context, when sent a comeFullyUpOnReload message
(i.e. "internalize").
We are now using DiskProxy for shared system objects like StrikeFonts.
The idea is to define, for each kind of object that needs special
externalization, a class method that will internalize the object by
reconstructing it from its defining state. We call this a
"constructor" method. Then externalize such an object as a frozen
message that invokes this method--a DiskProxy.
(Here is the old comment:
Constructing a new object is good for any object that (1) can not be
externalized simply by snapshotting and reloading its instance
variables (like a CompiledMethod or a Picture), or (2) wants to be
free to evolve its internal representation without making stored
instances obsolete (and dangerous). Snapshotting and reloading an
object"s instance variables is a dangerous breach of encapsulation.
The internal structure of the class is then free to evolve. All
externalized instances will be useful as long as the
constructor methods are maintained with the same semantics.
There may be several constructor methods for a particular class. This
is useful for (1) instances with characteristically different
defining state, and (2) newer, evolved forms of an object and its
constructors, with the old constructor methods kept around so old
data can still be properly loaded.)
Create one like this example from class Picture
DiskProxy global: #Picture
selector: #fromByteArray:
args: (Array with: self storage asByteArray)
* See also subclass DiskProxyQ that will construct an object in
the above manner and then send it a sequence of messages. This may save
creating a wide variety of constructor methods. It is also useful because
the newly read-in DiskProxyQ can catch messages like #objectContainedIn:
(via #doesNotUnderstand:) and add them to the queue of messages to
send to the new object.
* We may also want a subclass of DiskProxy that evaluates a string
expression to compute the receiver of the constructor message.
My instance variables:
* globalObjectName -- the Symbol name of a global object in the
System dictionary (usually a class).
* constructorSelector -- the constructor message selector Symbol to
send to the global object (perform:withArguments:), typically a
variation on newFrom:.
* constructorArgs -- the Array of arguments to pass in the
constructor message.
-- 11/9/92 Jerry Morrison
comeFullyUpOnReload:
Internalize myself into a fully alive object after raw loading from a
DataStream. (See my class comment.) DataStream will substitute the
object from this eval for the DiskProxy.
constructorArgs
constructorSelector
enter
Enter the new project
global:preSelector:selector:args:
Initialize self as a DiskProxy constructor with the given
globalNameSymbol, selectorSymbol, and argument Array.
I will internalize by looking up the global object name in the
SystemDictionary (Smalltalk) and sending it this message with
these arguments.
global:selector:args:
Initialize self as a DiskProxy constructor with the given
globalNameSymbol, selectorSymbol, and argument Array.
I will internalize by looking up the global object name in the
SystemDictionary (Smalltalk) and sending it this message with
these arguments.
globalObjectName
loadFromServer
In support of check for newer version in ProjectViewMorph menu
preSelector
preSelector:
printOn:
Try to report the name of the project
simpleGlobalOrNil
Return the object I refer to if it is a simple global in Smalltalk.
storeDataOn:
Besides just storing, get me inserted into references, so structures will know about class DiskProxy.
DoItEvent
A DoItEvent is xxxxxxxxx.
Instance Variables
context: <Object>
context
- xxxxx
changeKind
context
context:
expression:context:
isDoIt
printEventKindOn:
supportedKinds
DummySoundSystem
This is a dummy sound system registered in SoundService to absorb all sound playing and to use the primitive beep instead of sampled sounds when playing a beep.
beep
Make a primitive beep.
initialize
Subclasses should redefine this method to perform initializations on instance creation
playSampledSound:rate:
Do nothing.
playSoundNamed:
Do nothing.
playSoundNamed:ifAbsentReadFrom:
Do nothing.
playSoundNamedOrBeep:
There is no sound support, so we make the beep.
randomBitsFromSoundInput:
I'm not sure what the right thing to do here is.
sampledSoundChoices
No choices other than this.
soundNamed:
There are no sounds to look up.
unload
DummyStream
The purpose of this class is to absorb all steam messages and do nothing. This is so ReferenceStream can pretend to write on it while traversing all objects it would normally write. We need to know what those object are. 8/17/96 tk
nextInt32Put:
do nothing
nextNumber:put:
do nothing
nextPut:
do nothing
nextPutAll:
do nothing
nextStringPut:
do nothing
on:
originalContents
position
Return any random number. Here is where the real lying begins. We are a DummyStream afterall. 8/17/96 tk
position:
Pretend to position wherever the caller says!
skip:
Do nothing.
subclassResponsibility
Do nothing. Most messages to class Stream are defined as subclassResponsibility. Just accept them. 8/17/96 tk
EventManager
An EventManager is used to registers a 'observer' object's interest in in changes to an 'observed' object. Then when the observered object is changed, EventManager broadcasts the an update message to all objects with a registered interest. Finally, the Event manager can be used to remove an object from the list of observer object.
An interested object is said to be a dependant on the target object. Registering an interest in an event is called adding a dependant. Deregistering is called removing a dependant. The EventManager's action map is a WeakIdentityDictionary that maps events (selectors) to dependants (objects & selectors) in a way that ensures the mapping is to specific objects (hence identity) and in a way that allows the object to be garbage collected if not other used (hence weak.) EventManager class has ActionMaps which has one actionMap for each object.
Classic uses of an EventManager are to implement the Observer Pattern, see ChangeNotification or the MorphicModle as examples.
actionMap
actionMapFor:
actionMaps
addDependent:
Make the given object one of the receiver's dependents.
breakDependents
Remove all of the receiver's dependents.
changed:
Receiver changed. The change is denoted by the argument aParameter.
Usually the argument is a Symbol that is part of the dependent's change
protocol. Inform all of the dependents.
changedEventSelector
copy
Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.
dependents
Answer a collection of objects that are 'dependent' on the receiver;
that is, all objects that should be notified if the receiver changes.
flushEvents
releaseActionMap
releaseActionMapFor:
removeDependent:
Remove the given object as one of the receiver's dependents.
updateEventSelector
updateableActionMap
updateableActionMapFor:
ExternalClipboard
An ExternalClipboard is the abstract superclass for the platform specific clipboards based on the clipboard plugin (former ExtendedClipboardInterface originally developed for Sophie).
Instance Variables
clipboard: SmallInteger
clipboard
- handle for the external clipboard. If 0 the external clipboard is invalid
addClipboardData:dataFormat:
clearClipboard
clipboardText
Return the text currently in the clipboard. If the system clipboard is empty, or if it differs from the Smalltalk clipboard text, use the Smalltalk clipboard. This is done since (a) the Mac clipboard gives up on very large chunks of text and (b) since not all platforms support the notion of a clipboard.
clipboardText:
createClipboard
initialize
Subclasses should redefine this method to perform initializations on instance creation
primAddClipboardData:data:dataFormat:
primClearClipboard:
primCreateClipboard
primGetClipboardFormat:formatNumber:
primReadClipboardData:format:
ExternalDropHandler
An ExternalDropHandler is xxxxxxxxx.
Instance Variables
action: <Object>
extension: <Object>
type: <Object>
action
- xxxxx
extension
- xxxxx
type
- xxxxx
chooseServiceFrom:
defaultGZipHandler
defaultHandler
defaultHandler:
defaultImageHandler
defaultProjectHandler
extension
handle:in:dropEvent:
initialize
Subclasses should redefine this method to perform initializations on instance creation
lookupExternalDropHandler:
lookupServiceBasedHandler:
matchesExtension:
matchesTypes:
registerHandler:
registerStandardExternalDropHandlers
registeredHandlers
resetRegisteredHandlers
type
type:extension:action:
unwantedSelectors
ExternalSemaphoreTable
By John M McIntosh johnmci@smalltalkconsulting.com
This class was written to mange the external semaphore table. When I was writing a Socket test server I discovered various race conditions on the access to the externalSemaphore table. This new class uses class side methods to restrict access using a mutex semaphore. It seemed cleaner to deligate the reponsibility here versus adding more code and another class variable to SystemDictionary
Note that in Smalltalk recreateSpecialObjectsArray we still directly play with the table.
clearExternalObjects
externalObjects
initialize
Subclasses should redefine this method to perform initializations on instance creation
registerExternalObject:
safelyRegisterExternalObject:
safelyUnregisterExternalObject:
unregisterExternalObject:
ExternalSettings
ExternalSettings manages settings kept externally, e.g. files.
Objects can register themselves as clients to be notified at startup time to read their settings.
Eventually all the preferences should be managed through this mechanism.
assuredPreferenceDirectory
initialize
Subclasses should redefine this method to perform initializations on instance creation
parseServerEntryArgsFrom:
preferenceDirectory
preferenceDirectoryName
registerClient:
registeredClients
shutDown
startUp
FakeClassPool
The sole purpose of this class is to allow the Browser code pane to evaluate the class variables of the class whose method it is showing. It does this by stuffing a pointer to the classpool dictionary of the class being shown into its own classpool. It does this just around a doIt in the code pane. An instance of FakeClasspool is then used as the receiver of the doIt.
adopt:
FileModifyingSimpleServiceEntry
I represent a service that may change the contents of a directory.
Such changes include:
* file creation
* file deletion
* file modification
performServiceFor:
carry out the service I provide
FilePackage
A FilePackage is xxxxxxxxx.
Instance Variables
classOrder: <Object>
classes: <Object>
doIts: <Object>
fullName: <Object>
sourceSystem: <Object>
classOrder
- xxxxx
classes
- xxxxx
doIts
- xxxxx
fullName
- xxxxx
sourceSystem
- xxxxx
askForDoits
canceledConflictChecking
canceledConflictChecking:
checkForMoreRecentUpdateThanChangeSet:pseudoClass:selector:
Returns the source code for a conflict if a conflict is found, otherwise returns nil.
classAt:
classComment:
classDefinition:with:
classes
closeLog
conflictsWithUpdatedMethods
Check this package for conflicts with methods in the image which are in newer updates.
conflictsWithUpdatedMethods:
doIt:
doIts
fileIn
fileInDoits
fileInFrom:
fileOut
fileOutDoits:
fileOutOn:
fileReaderServicesForFile:suffix:
findUpdateChangeSetMatching:
Find update-changeset beginning with updateNumber, or reasonably close.
fixClassOrder
Essentially bubble sort the classOrder so that superclasses appear before subclasses
fromFileNamed:
fromFileNamed:encoding:
fullName:
fullPackageName
getClass:
initialize
Subclasses should redefine this method to perform initializations on instance creation
log:
logCr
logFileStream
metaClassDefinition:with:
method:
msgClassComment:with:
packageInfo
packageName
possibleSystemSource:
preamble:
removeClass:
removeDoIts
removedMethod:with:
renameClass:to:
sampleMethod
In an existing method there are always a number of changes.
Other stuff
will be deleted
Or even better,
some things may be just modified.
serviceConflictsWithUpdatedMethods
services
showIdenticalConflicts
verboseConflicts
FileServices
A FileServices is xxxxxxxxx.
Instance Variables
allRegisteredServices
initialize
Subclasses should redefine this method to perform initializations on instance creation
isReaderNamedRegistered:
itemsForDirectory:
itemsForFile:
registerFileReader:
registeredFileReaderClasses
removeObsolete
unregisterFileReader:
FontSubstitutionDuringLoading
signaled by font loading code when reading a DiskProxy that calls for a missing font.
defaultAction
No action is taken. The value nil is returned as the value of the message that signaled the exception.
familyName
Answer the value of familyName
familyName:
Set the value of familyName
forFamilyName:pixelSize:
pixelSize
Answer the value of pixelSize
pixelSize:
Set the value of pixelSize
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
HMAC
HMAC is a mechanism for message authentication using cryptographic hash functions. HMAC can be used with any iterative cryptographic hash function, e.g., MD5, SHA-1, in combination with a secret shared key. The cryptographic strength of HMAC depends on the properties of the underlying hash function.
See RFC 2114.
destroy
digestMessage:
digestSize
key:
on:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
setHash:
HTTPClient
A HTTPClient is xxxxxxxxx.
Instance Variables
browserSupportsAPI
browserSupportsAPI:
composeMailTo:subject:body:
determineIfRunningInBrowser
exampleMailTo
examplePostArgs
examplePostMultipart
getDirectoryListing:
httpGet:
httpGetDocument:
httpPostDocument:args:
httpPostDocument:target:args:
httpPostMultipart:args:
isRunningInBrowser
isRunningInBrowser:
mailTo:message:
pluginHttpPostMultipart:args:
requestURL:target:
shouldUsePluginAPI
uploadFileNamed:to:user:passwd:
HTTPDownloadRequest
A HTTPDownloadRequest is xxxxxxxxx.
Instance Variables
content: <Object>
loader: <Object>
process: <Object>
semaphore: <Object>
url: <Object>
content
- xxxxx
loader
- xxxxx
process
- xxxxx
semaphore
- xxxxx
url
- xxxxx
content:
contentStream
Return a stream on the content of a previously completed HTTP request
contents
for:in:
httpEncodeSafely:
Encode the url but skip $/ and $:.
isSemaphoreSignaled
Return true if the associated semaphore is currently signaled. This information can be used to determine whether the download has finished given that there is no other process waiting on the semaphore.
process:
signalAbort
startRetrieval
url
HTTPLoader
A HTTPLoader is xxxxxxxxx.
Instance Variables
downloads: <Object>
requests: <Object>
downloads
- xxxxx
requests
- xxxxx
abort
Abort all requests
addRequest:
default
httpRequestClass
initialize
Subclasses should redefine this method to perform initializations on instance creation
maxNrOfConnections
nextRequest
release
Remove references to objects that may refer to the receiver. This message
should be overridden by subclasses with any cycles, in which case the
subclass should also include the expression super release.
removeProcess:
removeRequest:
retrieveContentsFor:
retrieveObjectsFor:
Load a remote image segment and extract the root objects.
Check if the remote file is a zip archive.
startDownload
HaloThemePreferenceView
I am responsible for building the view for the preference that choose the halo theme
haloThemeRadioButtons
Answer a column of butons representing the choices of halo theme
handlesPanel:
initialize
Subclasses should redefine this method to perform initializations on instance creation
representativeButtonWithColor:inPanel:
unload
HashFunction
A HashFunction is xxxxxxxxx.
Instance Variables
blockSize
doubleHashMessage:
SHA1 new doubleHashMessage: 'foo'
doubleHashStream:
hashMessage:
MD5 new hashMessage: 'foo'
hashSize
hashStream:
hmac
ISOLanguageDefinition
An ISOLanguageDefinition is xxxxxxxxx.
Instance Variables
iso2: <Object>
iso3: <Object>
iso3Alternate: <Object>
language: <Object>
iso2
- xxxxx
iso3
- xxxxx
iso3Alternate
- xxxxx
language
- xxxxx
buildIso3166CodesTables
extraCountryDefinitions
extraISO3Definitions
initISO3LanguageTable
initISOCountries
initialize
Subclasses should redefine this method to perform initializations on instance creation
iso2
iso2:
iso2Countries
iso2LanguageDefinition:
iso2LanguageTable
iso3
iso3166Codes
iso3:
iso3Alternate
iso3Alternate:
iso3Countries
iso3LanguageDefinition:
iso3LanguageTable
isoLanguages
language
language:
readISOLanguagesFrom:
ImageSegment
I represent a segment of Squeak address space. I am created from an
array of root objects. After storing, my segment contains a binary
encoding of every object accessible from my roots but not otherwise
accessible from anywhere else in the system. My segment contains
outward pointers that are indices into my table of outPointers.
The main use of ImageSegments is to store Projects. A dummy
version of SmartRefStream traverses the Project. Everything it finds
is classified as either an object that is owned by the project (only
pointed to inside the project), or an object outside the project that
is pointed to from inside the project. The objects that are
completely owned by the project are compressed into pure binary form
in an ImageSegment. The outside objects are put in the 'outPointers'
array. The entire ImageSegment (binary part plus outPointers) is
encoded in a SmartRefStream, and saved on the disk. (aProject
exportSegmentWithChangeSet:fileName:directory:) calls (anImageSegment
writeForExportWithSources:inDirectory:changeSet:).
Note that every object inside the project is put into the
segment's arrayOfRoots. This is because a dummy SmartRefStream to
scan the project, in order to make intelligent decisions about what
belongs in the project.
See Project's class comment for what messages are sent to
objects as they are unpacked in a new image.

---- Older Details ------

The primary kind of image segment is an Export Segment. It
can be saved on a server and read into a completely different Squeak
image.
Old way to create one:
(ImageSegment new copyFromRootsForExport: (Array with: Baz with: Baz class))
writeForExport: 'myFile.extSeg'.
Old way to create one for a project:
(Project named: 'Play With Me - 3') exportSegment.
To read it into another image: Select 'myFile.extSeg' in a FileList,
Menu 'load as project'. It will install its classes automatically.
If you need to see the roots array, it is temporarily stored in
(SmartRefStream scannedObject).

Most of 'states' of an ImageSegment are not used to export a project,
and have been abandoned.

When a segment is written out onto a file, it goes in a
folder called <image name>_segs. If your image is called
"Squeak2.6.image", the folder "Squeak2.6_segs" must accompany the
image whenever your move, copy, or rename it.
Whenever a Class is in arrayOfRoots, its class (aClass class)
must also be in the arrayOfRoots.
There are two kinds of image segments. Normal image segments
are a piece of a specific Squeak image, and can only be read back
into that image. The image holds the array of outPointers that are
necessary to turn the bits in the file into objects.
To put out a normal segment that holds a Project (not the
current project), execute (Project named: 'xxx') storeSegment.


arrayOfRoots The objects that head the tree we will trace.
segment The WordArray of raw bits of all objects in the tree.
outPointers Oops of all objects outside the segment
pointed to from inside.
state (see below)
segmentName Its basic name. Often the name of a Project.
fileName The local name of the file. 'Foo-23.seg'
endMarker An object located in memory somewhere after a
segment that has
just been brought in. To enumerate the objects in
the segment, start at
the segment and go to this object.
userRootCnt number of roots submitted by caller. Extras
are added in preparation for saving.

state that an ImageSegment may exist in...

#activeCopy (has been copied, with the intent to
become active)
arrayOfRoots, segment, and outPointers have been created by
copyFromRoots:. The tree of objects has been encoded in the segment,
but those objects are still present in the Squeak system.

#active (segment is actively holding objects)
The segment is now the only holder of tree of objects. Each of the
original roots has been transmuted into an ImageSegmentRootStub that
refers back to this image segment. The original objects in the
segment will all be garbageCollected.

#onFile
The segment has been written out to a file and replaced by a file
pointer. Only ImageSegmentRootStubs and the array of outPointers
remains in the image. To get this far:
(ImageSegment new copyFromRoots: (Array with: Baz with: Baz class))
writeToFile: 'myFile.seg'.

#inactive
The segment has been brought back into memory and turned back into
objects. rootsArray is set, but the segment is invalid.

#onFileWithSymbols
The segment has been written out to a file, along with the text of
all the symbols in the outPointers array, and replaced by a file
pointer. This reduces the size of the outPointers array, and also
allows the system to reclaim any symbols that are not referred to
from elsewhere in the image. The specific format used is that of a
literal array as follows:
#(symbol1 symbol2 # symbol3 symbol4 'symbolWithSpaces' # symbol5).
In this case, the original outPointers array was 8 long, but the
compacted table of outPointers retains only two entries. These get
inserted in place of the #'s in the array of symbols after it is read
back in. Symbols with embedded spaces or other strange characters
are written as strings, and converted back to symbols when read back
in. The symbol # is never written out.
NOTE: All IdentitySets or dictionaries must be rehashed when
being read back from this format. The symbols are effectively
internal. (No, not if read back into same image. If a different
image, then use #imported. -tk)

#imported
The segment is on an external file or just read in from one. The
segment and outPointers are meant to be read into a foreign image.
In this form, the image segment can be read from a URL, and
installed. A copy of the original array of root objects is
constructed, with former outPointers bound to existing objects in the
host system.
(Any Class inside the segment MUST be in the arrayOfRoots.
This is so its association can be inserted into Smalltalk. The
class's metaclass must be in roots also. Methods that are in
outPointers because blocks point at them, were found and added to the
roots.
All IdentitySets and dictionaries are rehashed when being
read back from exported segments.)


To discover why only some of the objects in a project are being
written out, try this (***Destructive Test***). This breaks lots of
backpointers in the target project, and puts up an array of
suspicious objects, a list of the classes of the outPointers, and a
debugger.
"Close any transcripts in the target project"
World currentHand objectToPaste ifNotNil: [
self inform: 'Hand is holding a Morph in its paste buffer:\' withCRs,
World currentHand objectToPaste printString].
PV _ Project named: 'xxxx'.
(IS _ ImageSegment new) findRogueRootsImSeg:
(Array with: PV world presenter with: PV world).
IS findOwnersOutPtrs. "Optionally: write a file with owner chains"
"Quit and DO NOT save"

When an export image segment is brought into an image, it is like an
image starting up. Certain startUp messages need to be run. These
are byte and word reversals for nonPointer data that comes from a
machine of the opposite endianness. #startUpProc passes over all
objects in the segment, and:
The first time an instance of class X is encountered, (msg _
X startUpFrom: anImageSegment) is sent. If msg is nil, the usual
case, it means that instances of X do not need special work. X is
included in the IdentitySet, noStartUpNeeded. If msg is not nil,
store it in the dictionary, startUps (aClass -> aMessage).
When a later instance of X is encountered, if X is in
noStartUpNeeded, do nothing. If X is in startUps, send the message
to the instance. Typically this is a message like #swapShortObjects.
Every class that implements #startUp, should see if it needs
a parallel implementation of #startUpFrom:.
aComment
Compact classes are a potential problem because a pointer to the class would not ordinarily show up in the outPointers. We add the classes of all compact classes to outPointers, both for local and export segments.
Compact classes are never allowed as roots. No compact class may be in an Environment that is written out to disk. (In local segments, the compact classes array should never have an ImageSegmentRootStub in it. For export, fileIn the class first, then load a segment with instances of it. The fileIn code can be pasted onto the front of the .extSeg file)
For local segments, a class may become compact while its instances are out on the disk. Or it may become un-compact. A compact class may change shape while some of its instances are on disk. All three cases go through (ClassDescription updateInstancesFrom:). If it can't rule out an instance being in the segment, it reads it in to fix the instances.
See Behavior.becomeCompact for the rules on Compact classes. Indexes may not be reused. This is so that an incoming export segment has its index available. (Changes may be needed in the way indexes are assigned.)
For export segments, a compact class may have a different shape. The normal class reshape mechanism will catch this. During the installation of the segment, objects will have the wrong version of their class momentarily. We will change them back before we get caught.
For export segments, the last two items in outPointers are the number 1717 and an array of the compact classes used in this segment. (The classes in the array are converted from DiskProxies by SmartRefStream.) If that class is not compact in the new image, the instances are recopied.
acceptSingleMethodSource:
activeClasses
activeClassesByCategory
allInstancesOf:do:
Bring me in, locate instances of aClass and submit them to the block. Write me out again.
allObjectsDo:
Enumerate all objects that came from this segment. NOTE this assumes that the segment was created (and extracted). After the segment has been installed (install), this method allows you to enumerate its objects.
arrayOfRoots
arrayOfRoots:
cc:new:current:fake:refStrm:
Sort out all the cases and decide what to do. Every Fake class is uncompacted before having insts converted. As the segment is installed, instances of reshaped compact classes will have the wrong class. Trouble cases:
1) Existing class is compact in the segment and not compact here. Make that compact, (error if that slot is used), load the segment. If an class was just filed in, it is an existing class as far as we are concerned.
2) A compact class has a different shape. We created a Fake class. Load the segment, with instances in the seg having the Wrong Class!! Find the bad instancees, and copy them over to being the real class.
3) An existing class is not compact in the segment, but is in the image. Just let the new instance be uncompact. That is OK, and never reaches this code.
A class that is a root in this segment cannot be compact. That is not allowed.
classNameAt:
comeFullyUpOnReload:
fix up the objects in the segment that changed size. An
object in the segment is the wrong size for the modern version of the
class. Construct a fake class that is the old size. Replace the
modern class with the old one in outPointers. Load the segment.
Traverse the instances, making new instances by copying fields, and
running conversion messages. Keep the new instances. Bulk forward
become the old to the new. Let go of the fake objects and classes.
After the install (below), arrayOfRoots is filled in.
Globalize new classes. Caller may want to do some special install on
certain objects in arrayOfRoots.
May want to write the segment out to disk in its new form.
compactClassesArray
A copy of the real compactClassesArray, but with only the classes actually used in the segment. Slow, but OK for export.
compactIndexAt:
Look in this header word in the segment and find it's compact class index. *** Warning: When class ObjectMemory change, be sure to change it here. ***
compressedFileExtension
copyFromRoots:sizeHint:
Copy a tree of objects into a WordArray segment. The copied objects in the segment are not in the normal Squeak space. If this method yields a very small segment, it is because objects just below the roots are pointed at from the outside. (See findRogueRootsImSeg: for a *destructive* diagnostic of who is pointing in.)
Caller must hold onto Symbols.
To go faster, make sure objects are not repeated in aRootArray and other method directly, with true.
copyFromRoots:sizeHint:areUnique:
Copy a tree of objects into a WordArray segment. The copied objects in the segment are not in the normal Squeak space.
[1] For exporting a project. Objects were enumerated by ReferenceStream and aRootArray has them all.
[2] For exporting some classes. See copyFromRootsForExport:. (Caller must hold Symbols, or they will not get registered in the target system.)
[3] For 'local segments'. outPointers are kept in the image.
If this method yields a very small segment, it is because objects just below the roots are pointed at from the outside. (See findRogueRootsImSeg: for a *destructive* diagnostic of who is pointing in.)
copyFromRootsForExport:
When possible, use copySmartRootsExport:. This way may not copy a complete tree of objects. Add to roots: all of the methods pointed to from the outside by blocks.
copyFromRootsLocalFileFor:sizeHint:
If the roots include a World, add its Player classes to the roots.
copySmartRootsExport:
Use SmartRefStream to find the object. Make them all roots. Create the segment in memory. Project should be in first five objects in rootArray.
declare:
The class just arrived in this segment. How fit it into the Smalltalk dictionary? If it had an association, that was installed with associationDeclareAt:.
declareAndPossiblyRename:
The class just arrived in this segment. How fit it into the Smalltalk dictionary? If it had an association, that was installed with associationDeclareAt:.
deepCopyTest:
ImageSegment new deepCopyTest: Morph withAllSubclasses asArray
dependentsCancel:
Erase the place we temporarily held the dependents of things in this project. So we don't carry them around forever.
dependentsRestore:
Retrieve the list of dependents from the exporting system, hook them up, and erase the place we stored them.
dependentsSave:
Object that have dependents are supposed to be instances of subclasses of Model. But, class Objects still provides 'Global Dependents', and some people still use them. When both the model and the dependent are in a project that is being saved, remember them, so we can hook them up when this project is loaded in.
discoverActiveClasses
doSpaceAnalysis
Capture statistics about the IS and print the number of instances per class and space usage
endianness
Return which endian kind the incoming segment came from
errorWrongState
extract
This operation replaces (using become:) all the original roots of a segment with segmentRootStubs. Thus the original objects will be reclaimed, and the root stubs will remain to bring the segment back in if it is needed.
extractThenInstall
For testing only
fileExtension
findInOut:
Take an array of references to a morph, and try to classify them: in the segment, in outPointers, or other.
findOwnerMap:
Construct a string that has a printout of the owner chain for every morph in the list. Need it as a string so not hold onto them.
findOwnersOutPtrs
findRogueRootsAllMorphs:
This is a tool to track down unwanted pointers into the segment. If we don't deal with these pointers, the segment turns out much smaller than it should. These pointers keep a subtree of objects out of the segment.
1) assemble all objects should be in seg: morph tree, presenter, scripts, metaclasses. Put in a Set.
2) Remove the roots from this list. Ask for senders of each. Of the senders, forget the ones that are in the segment already. Keep others. The list is now all the 'incorrect' pointers into the segment.
findRogueRootsImSeg:
This is a tool to track down unwanted pointers into the segment. If we don't deal with these pointers, the segment turns out much smaller than it should. These pointers keep a subtree of objects out of the segment.
1) Break all owner pointers in submorphs and all scripts.
2) Create the segment and look at outPointers.
3) Remove those we expect.
4) Remember to quit without saving -- the owner pointers are smashed.
findRogueRootsPrep
Part of the tool to track down unwanted pointers into the segment. Break all owner pointers in submorphs, scripts, and viewers in flaps.
findRogueRootsRefStrm:
This is a tool to track down unwanted pointers into the segment. If we don't deal with these pointers, the segment turns out much smaller than it should. These pointers keep a subtree of objects out of the segment.
1) assemble all objects that should be in the segment by using SmartReference Stream and a dummyReference Stream. Put in a Set.
2) Remove the roots from this list. Ask for senders of each. Of the senders, forget the ones that are in the segment already. Keep others. The list is now all the 'incorrect' pointers into the segment.
fixCapitalizationOfSymbols
MultiString>>capitalized was not implemented correctly.
Fix eventual accessors and mutators here.
folder
ifOutPointer:thenAllObjectsDo:
If I point out to anObject, bring me in, Submit all my objects to the block. Write me out again.
install
This operation retrieves the segment if necessary from file storage, installs it in memory, and replaces (using become:) all the root stubs with the reconstructed roots of the segment.
isIntegerObject:
isOnFile
loadSegmentFrom:outPointers:
This primitive will install a binary image segment and return as its value the array of roots of the tree of objects represented. Upon successful completion, the wordArray will have been transmuted into an object of zero length. If this primitive should fail, it will have destroyed the contents of the segment wordArray.
localName
Return the current file name for this segment, a local name in the segments directory.
numberOfFieldsOf:
objectAfter:
Return the object or free chunk immediately following the given object or free chunk in the segment. *** Warning: When class ObjectMemory change, be sure to change it here. ***
objectJunksDo:
originalRoots
Return only the roots that the user submitted, not the ones we had to add.
outPointers
prepareToBeSaved
Prepare objects in outPointers to be written on the disk. They must be able to match up with existing objects in their new system. outPointers is already a copy.
Classes are already converted to a DiskProxy.
Associations in outPointers:
1) in Smalltalk.
2) in a classPool.
3) in a shared pool.
4) A pool dict pointed at directly
printSpaceAnalysisOn:
Capture statistics about the IS and print the number of instances per class and space usage
printTypeOf:
oop is a field pointer, which either is an int or a pointer into the seg or into outPointers
readFromFile
Read in a simple segment. Use folder of this image, even if remembered as previous location of this image
reclaimObsoleteSegmentFiles
rehashSets
I have just been brought in and converted to live objects. Find all Sets and Dictionaries in the newly created objects and rehash them. Segment is near then end of memory, since is was newly brought in (and a new object created for it).
Also, collect all classes of receivers of blocks. Return them. Caller will check if they have been reshaped.
remapCompactClasses:refStrm:
See if our compact classes are compatible with this system. Convert to what the system already has. If we are adding a new class, it has already been filed in. A compact class may not be a root.
reshapeClasses:refStream:
restoreEndianness
Fix endianness (byte order) of any objects not already fixed. Do this by discovering classes that need a startUp message sent to each instance, and sending it.
I have just been brought in and converted to live objects. Find all Sets and Dictionaries in the newly created objects and rehash them. Segment is near then end of memory, since is was newly brought in (and a new object created for it).
Also, collect all classes of receivers of blocks which refer to instance variables. Return them. Caller will check if they have been reshaped.
revert
Pretend this segment was never brought in. Check that it has a fileName. Replace (using become:) all the original roots of a segment with segmentRootStubs. Thus the original objects will be reclaimed, and the root stubs will remain to bring the segment back in if it is needed.
How to use revert: In the project, choose 'save for reverting'.
ReEnter the project. Make changes.
Either exit normally, and change will be kept, or
Choose 'Revert to saved version'.
rootsIncludingBlockMethods
Return a new roots array with more objects. (Caller should store into rootArray.) Any CompiledMethods that create blocks will be in outPointers if the block is held outside of this segment. Put such methods into the roots list. Then ask for the segment again.
rootsIncludingBlocks
For export segments only. Return a new roots array with more objects. (Caller should store into rootArray.) Collect Blocks and external methods pointed to by them. Put them into the roots list. Then ask for the segment again.
rootsIncludingPlayers
Players have been removed from Morphs, this method could now more accurately be renamed rootsIncludingMorphs
savePlayerReferences:
Save our associations we own in the shared References table. They will be installed when the segment is imported.
scanFrom:
Move source code from a fileIn to the changes file for classes in an ImageSegment. Do not compile the methods. They already came in via the image segment. After the ImageSegment in the file, !ImageSegment new! captures control, and scanFrom: is called.
segUpdateInstancesOf:toBe:isMeta:
Bring me in, locate instances of oldClass and get them converted. Write me out again.
segment
segmentCopy
This operation will install a copy of the segment in memory, and return a copy of the array of roots. The effect is to perform a deep copy of the original structure. Note that installation destroys the segment, so it must be copied before doing the operation.
segmentDirectory
segmentName
Return the local file name for this segment.
segmentName:
Local file name for this segment.
smartFillRoots:
Put all traced objects into my arrayOfRoots. Remove some
that want to be in outPointers. Return blockers, an
IdentityDictionary of objects to replace in outPointers.
startUp
state
storeDataOn:
Don't wrote the array of Roots. Also remember the structures of the classes of objects inside the segment.
storeSegmentFor:into:outPointers:
This primitive will store a binary image segment (in the same format as the Squeak image file) of the receiver and every object in its proper tree of subParts (ie, that is not refered to from anywhere else outside the tree). Note: all elements of the reciever are treated as roots indetermining the extent of the tree. All pointers from within the tree to objects outside the tree will be copied into the array of outpointers. In their place in the image segment will be an oop equal to the offset in the outpointer array (the first would be 4). but with the high bit set.
swapOutInactiveClasses
swapOutProjects
testClassFaultOn:
uniqueFileNameFor:
verify:matches:knowing:
verifyCopy
writeForExport:
Write the segment on the disk with all info needed to reconstruct it in a new image. For export. Out pointers are encoded as normal objects on the disk.
writeForExportOn:
Write the segment on the disk with all info needed to reconstruct it in a new image. For export. Out pointers are encoded as normal objects on the disk.
writeForExportWithSources:inDirectory:
Write the segment on the disk with all info needed to reconstruct it in a new image. For export. Out pointers are encoded as normal objects on the disk. Append the source code of any classes in roots. Target system will quickly transfer the sources to its changes file.
writeForExportWithSources:inDirectory:changeSet:
Write the segment on the disk with all info needed to
reconstruct it in a new image. For export. Out pointers are encoded
as normal objects on the disk. Append the source code of any classes
in roots. Target system will quickly transfer the sources to its
changes file.
writeForExportWithSourcesGZ:inDirectory:
Write the segment on the disk with all info needed to reconstruct it in a new image. For export. Out pointers are encoded as normal objects on the disk. Append the source code of any classes in roots. Target system will quickly transfer the sources to its changes file.
writeToFile
writeToFile:
The short name can't have any fileDelimiter characters in it. It is remembered in case the segment must be brought in and then sent out again (see ClassDescription updateInstancesFrom:).
writeToFileWithSymbols
writeToFileWithSymbols:
ImageSegmentRootStub
An ImageSegmentRootStub is a stub that replaces one of the root of an ImageSegment that has been extracted from the Squeak ObjectMemory. It has two very simple roles:
1. If any message is sent to one of these objects, it will be caught by doesNotUnderstand:, and bring about a reinstallation of the missing segment. This exception is caused by the fact that no other messages are defined in this class, and neither does it inherit any from above, since its superclass is nil. When the reinstallation has been accomplished, the message will be resent as though nothing was amiss.
2. If one of these objects is a class, and a message is sent to one of its instances, it will cause a similar fault which will be caught by cannotInterpret:. This exception is caused by a somewhat more subtle condition: the primitive operations of the virtual machine do not have time to check whether classes are resident or not -- they assume that all classes are resident. However every non-cached message lookup does test for a nil in the methodDictionary slot. If a rootStub replaces a class (or any behavior), it masquerades as the class, but it will have a nil in the slot where the method Dictionary is expected. This will cause the VM to send cannotInterpret:, eventually leading to the same process for reinstalling the missing segment and resending the message as above.
Just to be on the safe side, a rootStub that replaces a Behavior also carries a copy of both the superclass and format fields from the original class. This insures that, even if some operations of the VM require these values, things will continue to operate properly when the segment is absent.
doLogFaults
doesNotUnderstand:
Any normal message sent to this object is really intended for another object that is in a non-resident imageSegment. Reinstall the segment and resend the message.
dontLogFaults
faultLogs
isInMemory
We are a place holder for an object that is out.
startLoggingFaults
stopLoggingFaults
xxSuperclass:format:segment:
Set up fields like a class but with null methodDict
xxxClass
Primitive. Answer the object which is the receiver's class. Essential. See
Object documentation whatIsAPrimitive.
xxxSegment
Imports
I represent imported resources such as images, sounds, and other kind of files.
For now I only store images in a simple way.
To access my default instance use: Imports default. However I'm not a strict singleton
and clients may create several of me using new.
default
default:
images
returns all the imported images
importImage:named:
importImageDirectory:
importImageDirectoryWithSubdirectories:
importImageFromFileNamed:
imports
initialize
Subclasses should redefine this method to perform initializations on instance creation
namesAndImagesDo:
iterate over all the names and image
LRUCache
I'm a cache of values, given a key I return a Value from the cache or from the factory
at:
answer the object for aKey, if not present in the cache creates it.
Clone the factory block before calling in case of multiple processes!
initializeSize:factory:
initialize the receiver's size and factory
printOn:
Append to the argument, aStream, a sequence of characters
that identifies the receiver.
size:factory:
test
test2
Locale
Main comment stating the purpose of this class and relevant relationship to other classes.
http://www.w3.org/WAI/ER/IG/ert/iso639.htm
http://www.oasis-open.org/cover/iso639a.html
See also
http://oss.software.ibm.com/cvs/icu/~checkout~/icuhtml/design/language_code_issues.html
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.10

ISO 3166
http://mitglied.lycos.de/buran/knowhow/codes/locales/
addLocalChangedListener:
current
currentPlatform
currentPlatform:
currentPlatform:during:
defaultEncodingName:
determineCurrentLocale
determineLocale
determineLocaleID
Locale current determineLocaleID
fetchISO2Language
Locale current fetchISO2Language
initKnownLocales
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializePlatformEncodings
isoCountry
isoLanguage
isoLanguage:
isoLanguage:isoCountry:
isoLocale
<language>-<country>
isoLocale:
knownLocales
languageEnvironment
languageSymbol:
localeChanged
localeChangedListeners
localeID
localeID:
migrateSystem
platformEncodings
primCountry
Returns string with country tag according to ISO 639
primCurrencyNotation
Returns boolean if symbol is pre- (true) or post-fix (false)
primCurrencySymbol
Returns string with currency symbol
primDST
Returns boolean if DST (daylight saving time) is active or not
primDecimalSymbol
Returns string with e.g. '.' or ','
primDigitGrouping
Returns string with e.g. '.' or ',' (thousands etc)
primLanguage
returns string with language tag according to ISO 639
primLongDateFormat
Returns the long date format
d day, m month, y year,
double symbol is null padded, single not padded (m=6, mm=06)
dddd weekday
mmmm month name
primMeasurement
Returns boolean denoting metric(true) or imperial(false).
primShortDateFormat
Returns the short date format
d day, m month, y year,
double symbol is null padded, single not padded (m=6, mm=06)
dddd weekday
mmmm month name
primTimeFormat
Returns string time format
Format is made up of
h hour (h 12, H 24), m minute, s seconds, x (am/pm String)
double symbol is null padded, single not padded (h=6, hh=06)
primTimezone
The offset from UTC in minutes, with positive offsets being towards the east.
(San Francisco is in UTC -08*60 and Paris is in GMT +01*60 (daylight savings is not in effect).
primVMOffsetToUTC
Returns the offset in minutes between the VM and UTC.
If the VM does not support UTC times, this is 0.
Also gives us backward compatibility with old VMs as the primitive will fail and we then can return 0.
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
startUp:
stringForLanguageNameIs:
switchAndInstallFontToID:
switchTo:
switchToID:
LocaleID
A LocaleID is xxxxxxxxx.
Instance Variables
isoCountry: <Object>
isoLanguage: <Object>
isoCountry
- xxxxx
isoLanguage
- xxxxx
=
Answer whether the receiver and the argument represent the same
object. If = is redefined in any subclass, consider also redefining the
message hash.
current
displayCountry
displayLanguage
displayName
Answer a proper name to represent the receiver in GUI.

The wording is provided by translations of the magic value
'<language display name>'.

'English' -> 'English'
'German' -> 'Deutsch'
hasParent
hash
Answer a SmallInteger whose value is related to the receiver's identity.
May be overridden, and should be overridden in any classes that define =
isoCountry
isoLanguage
isoLanguage:
isoLanguage:isoCountry:
isoString
isoString:
parent
printOn:
<language>-<country>
storeOn:
Append to the argument aStream a sequence of characters that is an
expression whose evaluation creates an object similar to the receiver.
translator
MD5
This class implements the MD5 128-bit one-way hash function. It uses the MD5Plugin for better performance. Some methods are taken from the original version of MD5NonPrimitive.
blockSize
finalValue
hashSize
hashStream:
initialize
Some magic numbers to get the process started
isPluginAvailable
new
primProcessBuffer:withState:
processBuffer:
processFinalBuffer:bitLength:
Pad the buffer until we have an even 64 bytes, then transform
storeLength:in:
Fill in the final 8 bytes of the given ByteArray with a 64-bit
little-endian representation of the original message length in bits.
MD5NonPrimitive
This class implements the MD5 128-bit one-way hash function. It relies on
the ThirtyTwoBitRegister class supplied as part of the "Digital Signatures"
functionality included in Squeak 2.7. As of this date (1/20/2000), the
U.S. Government has lifted many of the previous restrictions on the export
of encryption software, but you should check before exporting anything
including this code. MD5 is commonly used for some secure Internet
protocols, including authentication in HTTP, which is why I wrote it.
Submitted by Duane Maxwell
fX:Y:Z:
compute 'xy or (not x)z'
ffA:B:C:D:M:S:T:
compute a = b + ((a + f(b,c,d) + m + t) <<< s)
finalValue
Concatenate the state values to produce the 128-bite result
gX:Y:Z:
compute 'xz or y(not z)'
ggA:B:C:D:M:S:T:
compute a = b + ((a + g(b,c,d) + m + t) <<< s)
hX:Y:Z:
compute 'x xor y xor z'
hhA:B:C:D:M:S:T:
compute a = b + ((a + h(b,c,d) + m + t) <<< s)
iX:Y:Z:
compute 'y xor (x or (not z))'
iiA:B:C:D:M:S:T:
compute a = b + ((a + i(b,c,d) + m + t) <<< s)
initialize
Some magic numbers to get the process started
processBuffer:
Process a 64-byte buffer
round:selector:round:
Do one round with the given function
rounds:
Perform the four rounds with different functions
step:template:selector:
Perform one step in the round
MacOSClipboard
A MacOSClipboard is xxxxxxxxx.
Instance Variables
addUF8StringClipboardData:
MacOSXPlatform
A MacOSXPlatform is xxxxxxxxx.
Instance Variables
clipboardClass
isActivePlatform
platformFamily
Returns a symbol specific to the platform family (MacOSX, Windows, Unix, RiscOS).
This may need to be extended if there are new platforms added or significant differences within a platform family arise (as was the case between MacOS 9 and X).
MailSender
A MailSender is xxxxxxxxx.
Instance Variables
isSmtpServerSet
sendMessage:
setSmtpServer
setUserName
smtpServer
userName
MczInstaller
A MczInstaller is xxxxxxxxx.
Instance Variables
stream: <Object>
zip: <Object>
stream
- xxxxx
zip
- xxxxx
associate:
checkDependencies
clearVersionInfo
extension
extractInfoFrom:
extractPackageName
extractVersionInfo
fileReaderServicesForFile:suffix:
initialize
Subclasses should redefine this method to perform initializations on instance creation
install
installFileNamed:
installMember:
installStream:
loadVersionFile:
on:
parseMember:
recordVersionInfo
registerForFileList
scanner
serviceLoadVersion
services
storeVersionInfo:
stream:
unloadMonticello
useNewChangeSetDuring:
versionInfo
versions:anySatisfy:
MethodChangeRecord
MethodChangeRecords are used to record method changes. Here is a simple summary of the relationship between the changeType symbol and the recording of prior state
| prior == nil | prior not nil
--------- |---------------------------- |--------------------
add | add | change
--------- |---------------------------- |--------------------
remove | addedThenRemoved | remove
Structure:
changeType symbol -- as summarized above
currentMethod method
This is the current version of the method.
It can be used to assert this change upon entry to a layer.
infoFromRemoval -- an array of size 2.
The first element is the source index of the last version of the method.
The second element is the category in which it was defined, so it
can be put back there if re-accepted from a version browser.
Note that the above states each have an associated revoke action:
add --> remove
change --> change back
remove --> add back
addedThenRemoved --> no change
However all of these are accomplished trivially by restoring the original method dictionary.
changeType
currentMethod
methodInfoFromRemoval
Return an array with the source index of the last version of the method,
and the category in which it was defined (so it can be put back there if
re-accepted from a version browser).
noteChangeType:
noteMethodInfoFromRemoval:
Store an array with the source index of the last version of the method,
and the category in which it was defined (so it can be put back there if
re-accepted from a version browser).
noteNewMethod:
NEVER do this. It is evil.
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
priorMethod:
We do not save original versions of changed methods because we only
revoke changes at the level of entire classes, and that is done by
restoration of the entire methodDictionary.
storeDataOn:
Store myself on a DataStream. Answer self. This is a low-level DataStream/ReferenceStream method. See also objectToStoreOnDataStream. NOTE: This method must send 'aDataStream beginInstance:size:' and then (nextPut:/nextPutWeak:) its subobjects. readDataFrom:size: reads back what we write here.
MethodReference
A MethodReference is is a lightweight proxy for a CompiledMethod. Has methods for pointed to the CompileMethod's source statements, byte codes. Is heavily used my Tools.
Instance Variables
classIsMeta: Boolean class vs. instance
classSymbol: Symbol for method's class (without class keyword if meta)
methodSymbol: Symbol for method's selector
stringVersion: 'Class>>selector:' format
<=
=
Answer whether the receiver and the argument represent the
same object.
actualClass
asMethodDefinition
asNode
asStringOrText
Answer a string that represents the receiver.
category
category:
class:selector:
class:selector:package:
classIsMeta
classSymbol
compiledMethod
hash
Answer a SmallInteger whose value is related to the receiver's
identity.
isLocalSelector
isValid
Answer whether the receiver represents a current selector or Comment
methodClass
methodSymbol
package
we will have to change that in the future since we will not rely on * convention
package:
printOn:
Print the receiver on a stream
selector
setClass:methodSymbol:stringVersion:
setClassAndSelectorIn:
setClassSymbol:classIsMeta:methodSymbol:stringVersion:
setStandardClass:methodSymbol:
source
sourceCode
sourceString
stringVersion
stringVersion:
timeStamp
MidiPrimTester
This class simply demonstrates and tests the MIDI primitives. MIDI applications should use Stephen Pope's MIDIPort class, which will replace this one.
The Macintosh, and perhaps some other platforms, can send and receive MIDI data over a serial port by using an external clock signal supplied by an external MIDI adapter to generate the correct MIDI baud rate. Typical clock speeds of such adapters are 1, 2, or 0.5 MHz. This clock speed can be specified when a MIDI port is opened. On other platforms, this clock speed parameter is ignored.
bufferTimeStampFrom:
Return the timestamp from the given MIDI input buffer. Assume the given buffer is at least 4 bytes long.
canTurnOnParameter:
Return true if the given MIDI parameter can be turned on. Leave the parameter in its orginal state.
getDriverParameters
Return a string that describes this platform's MIDI parameters.
getInputForSeconds:onPort:
Collect MIDI input from the given port for the given number of seconds, and answer a string describing the data read.
getPortList
Return a string that describes this platform's MIDI ports.
initialize
Subclasses should redefine this method to perform initializations on instance creation
openPort:andDo:
Open the given MIDI port, evaluate the block, and close the port again. Answer the value of the block.
playDrumRoll:count:onPort:
MidiPrimTester new playDrumRoll: 75 count: 64 onPort: 0
playNoteOnPort:
MidiPrimTester new playNoteOnPort: 0
playScale:onPort:
MidiPrimTester new playScale: 130 onPort: 0
primMIDIClosePort:
primMIDIGetClock
primMIDIGetPortCount
primMIDIGetPortDirectionality:
primMIDIGetPortName:
primMIDIOpenPort:readSemaIndex:interfaceClockRate:
Open the given MIDI port. If non-zero, readSemaIndex specifies the index in the external objects array of a semaphore to be signalled when incoming MIDI data is available. Not all platforms support signalling the read semaphore. InterfaceClockRate specifies the clock rate of the external MIDI interface adaptor on Macintosh computers; it is ignored on other platforms.
primMIDIParameterGet:
primMIDIParameterSet:to:
primMIDIReadPort:into:
primMIDIWritePort:from:at:
ModifiedClassDefinitionEvent
A ModifiedClassDefinitionEvent is xxxxxxxxx.
Instance Variables
anyChanges
areClassVarsModified
areInstVarsModified
areSharedPoolsModified
classDefinitionChangedFrom:to:
classVarNames
instVarNames
isSuperclassModified
isTraitCompositionModified
isTypeModified
oldClassVarNames
oldInstVarNames
oldSharedPools
oldSuperclass
oldTraitComposition
oldTypeOfClass
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
sharedPools
superclass
supportedKinds
traitComposition
typeOfClass
ModifiedEvent
A ModifiedEvent is xxxxxxxxx.
Instance Variables
oldItem: <Object>
oldItem
- xxxxx
changeKind
classDefinitionChangedFrom:to:
isModified
isProtocolModified
methodChangedFrom:to:selector:inClass:
methodChangedFrom:to:selector:inClass:requestor:
oldItem
oldItem:
printEventKindOn:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
supportedKinds
ModifiedMethodEvent
A ModifiedMethodEvent is xxxxxxxxx.
Instance Variables
newProtocol: <Object>
oldProtocol: <Object>
newProtocol
- xxxxx
oldProtocol
- xxxxx
isProtocolModified
newProtocol
newProtocol:
oldProtocol
oldProtocol:
ModifiedTraitDefinitionEvent
A ModifiedTraitDefinitionEvent is xxxxxxxxx.
Instance Variables
anyChanges
isTraitCompositionModified
oldTraitComposition
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
supportedKinds
traitComposition
traitDefinitionChangedFrom:to:
MorphicTextEditor
A MorphicTextEditor is xxxxxxxxx.
Instance Variables
NaturalLanguageFormTranslator
A NaturalLanguageFormTranslator is xxxxxxxxx.
Instance Variables
generics: <Object>
id: <Object>
generics
- xxxxx
id
- xxxxx
cachedTranslations
generics
isoLanguage:
isoLanguage:isoCountry:
loadFormsFrom:
localeID
localeID:
name:form:
saveFormsOn:
translate:
NaturalLanguageTranslator
A NaturalLanguageTranslator is xxxxxxxxx.
Instance Variables
contexts: <Object>
generics: <Object>
id: <Object>
contexts
- xxxxx
generics
- xxxxx
id
- xxxxx
allKnownPhrases
availableLanguageLocaleIDs
cachedTranslations
checkPhrase:translation:
cleanUpCache
current
default
defaultBackgroundColor
answer the receiver's defaultBackgroundColor for views
directoryForLanguage:country:create:
directoryForLocaleID:create:
displayLanguage
displayName
fileOutHeader
fileOutHeaderOn:
fileOutOn:
self current fileOutOn: Transcript. Transcript endEntry
fileOutOn:keys:
self current fileOutOn: Transcript. Transcript endEntry
fileReaderServicesForFile:suffix:
generics
initialize
Subclasses should redefine this method to perform initializations on instance creation
isoCountry
isoLanguage
isoLanguage:
isoLanguage:isoCountry:
loadAvailableExternalLocales
loadExternalTranslationsFor:
loadForLocaleIsoString:fromGzippedMimeLiteral:
loadFromFileNamed:
Load translations from an external file
loadFromRefStream:
Load translations from an external file
loadFromStream:
Load translations from an external file
loadTranslatorForIsoLanguage:isoCountry:
localeDirCreate:
localeID
localeID:
mergeTranslationFileNamed:
mergeTranslations:
Merge a new set of translations into the exiting table.
Overwrites existing entries.
nextChunkPut:on:
phrase:translation:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
processExternalObject:
pivate - process the external object
rawPhrase:translation:
rawRemoveUntranslated:
registerPhrase:
registeredPhraseFor:
removeTranslationFor:
removeUntranslated:
resetCaches
saveToFileNamed:
save the receiver's translations to a file named fileNameString
scanFrom:
Read a definition of dictionary.
Make sure current locale corresponds my locale id
serviceMergeLanguageTranslations
services
startUp:
translate:
translate:in:
translationFor:
translationSuffix
translations
untranslated
writeAsMimeString
OSPlatform
An OSPlatform is an abstract representation of a 'OS platform'.
Platforms can be hierarchical, e.g., a "general" platform as superclass and more specific platforms as subclasses as long as the subclasses provide sufficient means to identify themselves.
The original implementation was for Tweak.
Current holds the current OSPlatform subclass
Architectural considerations:
most platform specific methods that need to be added to the platform class should be in the form of extensions rather then adding them directly to this package. Otherwise the platform class will degenerate very quickly into a dependence hub for all kinds of sub systems.
clipboardClass
current
determineActivePlatformStartingAt:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isActivePlatform
platformFamily
Returns a symbol specific to the platform family (MacOSX, Windows, Unix, RiscOS).
This may need to be extended if there are new platforms added or significant differences within a platform family arise (as was the case between MacOS 9 and X).
shutDown:
Squeak is shutting down. If this platform requires specific shutdown code, this is a great place to put it.
startUp:
Squeak is starting up. If this platform requires specific intialization, this is a great place to put it.
virtualKey:
ObjectFinalizer
An ObjectFinalizer is xxxxxxxxx.
Instance Variables
arguments: <Object>
receiver: <Object>
selector: <Object>
arguments
- xxxxx
receiver
- xxxxx
selector
- xxxxx
finalize
Finalize the resource associated with the receiver. This message should only be sent during the finalization process. There is NO garantuee that the resource associated with the receiver hasn't been free'd before so take care that you don't run into trouble - this all may happen with interrupt priority.
receiver:selector:argument:
ObjectScanner
An instance of this class is the compiler's context for filing in a SmartRefStream containing instance-specific classes. When the old name of a new object's class conflicts with an existing class name, install a class var in me. It has the old name but points at the new class. The compiler uses it when compiling the code in the fileIn. Fill the SmartRefStream's renamed class dictionary.
An object fileout:
!ObjectScanner new initialize! "allow me to take control with scanFrom:"
Player subclass: Player23 instanceVariableNames: 'foo' classVariableNames: ''
poolDictionaries: nil category: 'Instance Specific'!
"I prescan this and (self rename: #Player23 toBe: #Player30)"
!Player23 methodsFor: 'all' stamp: 'tk 3/9/98 18:58'! "actually sent to Player30"
foo
^ foo! !
!self smartRefStream!<binary representation of the objects>!
clear
remove all old class vars. They were UniClasses being remapped to aviod a name conflict.
initialize
remove all old class vars that are not instance-specific classes being renamed
lookAhead:
See if this chunk is a class Definition, and if the new class name already exists and is instance-specific. Modify the chunk, and record the rename in the SmartRefStream and in me.
rename:toBe:
See if there is a conflict between what the fileIn wants to call the new UniClass (Player23) and what already exists for another unique instance. If conflict, make a class variable to intercept the existingName and direct it to class newName.
scanFrom:
Sieze control of the fileIn. Put myself in as the context. If any UniClasses (for just one instance) are defined, they will do it through me, and I will look for conflicting class names. If so, install the old name as a class var of me, so the compile will work. Tell my SmartRefStream about renaming the class.
smartRefStream
PluginHTTPDownloadRequest
HTTPBrowserRequest attempts to fetch the contents through a Webbrowser. This works transparently if Squeak is not running in the browser.
contentStream
Return a stream on the content of a previously completed HTTP request
contents
maxAttempts
Return the number of attempts to retry before giving up
signalAbort
startRetrieval
Preference
Represents a true/false flag that is under user control and which can be interrogated by a call to Preferences
viewRegistry the registry of the classes responsible for building my view
name a symbol, the formal name of the preference.
value a boolean, the current value
defaultValue the default value of the preference
helpString string or text, constituting the help message
localToProject boolean, whether each project holds its own version
categoryList list of categories under which to offer this
changeInformee whom, if anyone, to inform if the value changes:
changeSelector what selector to send to the changeInformee when the value changes
categoryList
Answer the categoryList
categoryList:
Set the receiver's categoryList
changeInformee
changeInformee:
Set the object to be informed when my value changes
changeInformee:changeSelector:
Set the changeInformee and changeSelector as specified
copyName
Copy the name of the given preference to the clipboard
defaultValue
Answer this preference's defaultValue
defaultValue:
Set the receiver's defaultValue
helpString
Answer the help string provided for the receiver
isObsolete
isProjectLocalString
Answer a string representing whether sym is a project-local preference or not
localToProject
Answer whether this preference is project-local
name
Answer this preference's name
name:defaultValue:helpString:localToProject:categoryList:changeInformee:changeSelector:viewRegistry:
Initialize the preference from the given values. There is an extra tolerence here for the symbols #true, #false, and #nil, which are interpreted, when appropriate, as meaning true, false, and nil
notifyInformeeOfChange
If there is a changeInformee, notify her that I have changed value
preferenceValue
Answer the current value of the preference
preferenceValue:
set the value as indicated, and invoke the change selector if appropriate
printOn:
Print a string decribing the receiver to the given stream
rawValue:
set the value as indicated, with no side effects
representativeButtonWithColor:inPanel:
restoreDefaultValue
restore the default value to the preference
togglePreferenceValue
Toggle whether the value of the preference. Self must be a boolean preference.
toggleProjectLocalness
Toggle whether the preference should be held project-by-project or globally
viewClassForPanel:
viewForPanel:
viewRegistry
viewRegistry:
PreferenceView
My subclasses instances are responsible for building the visual representation of each kind of preference.
handlesPanel:
initializeWithPreference:
preference
preference:
representativeButtonWithColor:inPanel:
tearOffButton
Hand the user a button the can control this
PreferenceViewRegistry
PreferenceViewRegistry is much like the AppRegistry classes. Its purpose is to allow PreferenceBrowser implementers to register its own views for each kind of preference.
initialize
Subclasses should redefine this method to perform initializations on instance creation
ofBooleanPreferences
ofColorPreferences
ofFontPreferences
ofHaloThemePreferences
ofNumericPreferences
ofSoundThemePreferences
ofTextPreferences
ofUIThemePreferences
register:
registeredClasses
registries
registryOf:
unregister:
viewClassFor:
viewOrder
answer the order in which the registered views should appear relative to the other views
viewOrder:
Preferences
A general mechanism to store preference choices. The default setup treats any symbol as a potential boolean flag; flags unknown to the preference dictionary are always returned as false.
To open the control panel: Preferences openFactoredPanel
To read how to use the panel (and how to make a preference be per-project):
Preferences giveHelpWithPreferences
All messages are on the class side.
To query a a preference:
Preferences logDebuggerStackToFile
or some people prefer the more verbose
Preferences valueOfFlag: #logDebuggerStackToFile
You can make up a new preference any time. Do not define a new message in Preferences class. Accessor methods are compiled automatically when you add a preference as illustrated below:
To add a preference (e.g. in the Postscript of a fileout):
Preferences addPreference: #samplePreference categories: #(general browsing)
default: true balloonHelp: 'This is an example of a preference added by a do-it'
projectLocal: false changeInformee: nil changeSelector: nil.
To change a preference programatically:
Preferences disable: #logDebuggerStackToFile.
Or to turn it on,
Preferences enable: #logDebuggerStackToFile.
Curvier
DPConflict
DPDebugging
DPDuplicated
DPLocal
DPLong
DPOverride
DPRecentlyModified
DPRequired
DPSuperSend
DPSupplied
DPUncommented
FreeTypeCacheSize
GlyphContrast
HintingFull
HintingLight
HintingNone
HintingNormal
MonitorTypeCRT
MonitorTypeLCD
UpdateFontsAtImageStartup
aaFontsColormapDepth
acceptAnnotationsFrom:
addBooleanPreference:categories:default:balloonHelp:
addBooleanPreference:categories:default:balloonHelp:projectLocal:changeInformee:changeSelector:
addBooleanPreference:category:default:balloonHelp:
addColorPreference:categories:default:balloonHelp:
addColorPreference:category:default:balloonHelp:
addFontPreference:categories:default:balloonHelp:
addFontPreference:category:default:balloonHelp:
addModelItemsToWindowMenu:
aMenu is being constructed to be presented to the user in response to the user's pressing on the menu widget in the title bar of a morphic window. Here, the model is given the opportunity to add any model-specific items to the menu, whose default target is the SystemWindow itself.
addNumericPreference:categories:default:balloonHelp:
addNumericPreference:category:default:balloonHelp:
addPreference:categories:default:balloonHelp:
addPreference:categories:default:balloonHelp:projectLocal:changeInformee:changeSelector:
addPreference:categories:default:balloonHelp:projectLocal:changeInformee:changeSelector:viewRegistry:
addPreference:category:default:balloonHelp:
addTextPreference:categories:default:balloonHelp:
addTextPreference:category:default:balloonHelp:
allPreferenceObjects
allowBlockArgumentAssignment
allowUnderscoreAssignment
allwaysShowVScrollBar
alternateHandlesLook
alternativeButtonsInScrollBars
alwaysHideHScrollbar
alwaysShowConnectionVocabulary
alwaysShowHScrollbar
alwaysShowVScrollbar
annotationEditingWindow
annotationInfo
annotationPanes
annotationPanesChanged
areaFillsAreTolerant
areaFillsAreVeryTolerant
autoFocusForColumns
autoIndent
automaticFlapLayout
automaticFlapLayoutString
automaticKeyGeneration
automaticPlatformSettings
balloonHelpDelayTime
balloonHelpEnabled
beDynamic
bigDisplay
biggerHandles
borderColorWhenRunning
browseThemes
browseToolClass
browseWithPrettyPrint
browserWindowColor
canRecordWhilePlaying
caretWidth
caretWidth:
caseSensitiveFinds
categoriesContainingPreference:
categoryNames
cautionBeforeClosing
changeListWindowColor
changeSorterWindowColor
chasingBrowsers
checkForSlips
checkForUnsavedProjects
checkForWindowColors
chooseBalloonHelpFont
chooseCodeFont
chooseEToysTitleFont
chooseFlapsFont
chooseFontWithPrompt:andSendTo:withSelector:
chooseFontWithPrompt:andSendTo:withSelector:highlight:
chooseFontWithPrompt:andSendTo:withSelector:highlightSelector:
chooseHaloLabelFont
chooseInitialSettings
chooseListFont
chooseMenuFont
chooseStandardButtonFont
chooseSystemFont
chooseWindowTitleFont
classCommentOnClassSelect
classCommentVersionsBrowserWindowColor
classicHaloSpecs
classicHalosInForce
cmdDotEnabled
cmdGesturesEnabled
cmdKeysInText
compileAccessMethodForPreference:
compileHardCodedPref:enable:
conversionMethodsAtFileOut
cpuWatcherEnabled
customHaloSpecs
customHalosInForce
darkenStandardWindowPreferences
debugHaloHandle
debugLogTimestamp
debugMenuItemsInvokableFromScripts
debugPrintSpaceLog
debugShowDamage
debuggerWindowColor
decorateBrowserButtons
defaultAnnotationRequests
defaultAnnotationRequests:
defaultAuthorName
defaultPaintingExtent
defaultValueTableForCurrentRelease
defaultWindowColor
defaultWorldColor
desktopColor
desktopColor:
desktopMenuTitle
dictionaryOfPreferences
dictionaryOfPreferences:
diffsInChangeList
diffsWithPrettyPrint
disable:
disableGently:
disableProgrammerFacilities
disableProgrammerFacilitiesWithoutWarning
dismissAllOnOptionClose
doesNotUnderstand:
Handle the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message (typically sent from the machine when a message is sent to the receiver and no method is defined for that selector).
dualChangeSorterWindowColor
duplicateAllControlAndAltKeys
duplicateControlAndAltKeys
dynamicProtocolActivation
easySelection
ecompletionCaseSensitive
ecompletionEnabled
ecompletionSmartCharacters
editAnnotations
editCustomHalos
editableStringMorphs
enable:
enableGently:
enableLocalSave
enableOrDisable:asPer:
enableProgrammerFacilities
enableProjectNavigator
expandedPublishing
expungeParameter:
externalFocusForPluggableText
extraDebuggerButtons
fadedBackgroundWindows
fastDragWindowForMorphic
fenceSoundEnabled
fenceSoundEnabled:
fileContentsBrowserWindowColor
fileListWindowColor
fontConfigurationMenu
fontFactor
fullScreenLeavesDeskMargins
generalizedYellowButtonMenu
giveHelpWithPreferences
gradientButtonLook
gradientMenu
gradientScrollBars
gradientScrollbarLook
haloEnclosesFullBounds
haloSpecifications
haloSpecificationsForWorld
haloTheme
haloTransitions
hierarchyBrowserIsRB
higherPerformance
honorDesktopCmdKeys
httpProxyPort
httpProxyServer
iconicHaloSpecifications
iconicHalosInForce
includeSoundControlInNavigator
infiniteUndo
infiniteUndoChanged
initializeDictionaryOfPreferences
initializeParameters
initializeTextHighlightingParameters
inlineServicesInMenu
insertionPointColor
insertionPointColor:
inspectParameters
installBrightWindowColors
installClassicHaloSpecs
installCustomHaloSpecs
installHaloSpecsFromArray:
installHaloTheme:
installIconicHaloSpecs
installMissingWindowColors
installPastelWindowColors
installSimpleHaloSpecs
installTheme:
installUniformWindowColors
installWindowColorsVia:
instanceBrowserWindowColor
keepTasklistOpen
keyboardFocusColor
keyboardFocusColor:
lexiconWindowColor
lightenStandardWindowPreferences
loadPreferencesFrom:
localeChanged
logDebuggerStackToFile
magicHalos
maintainHalos
maxBalloonHelpLineLength
menuAppearance3d
menuBorderColor
menuBorderWidth
menuButtonInToolPane
menuColor
menuColorFromWorld
menuColorString
menuKeyboardControl
menuLineColor
menuSelectionColor
menuTitleBorderColor
menuTitleBorderWidth
menuTitleColor
menuWithIcons
mercuryPanel
messageListWindowColor
messageNamesWindowColor
messengersInViewers
metaMenuDisabled
methodFinderWindowColor
modalColorPickers
mouseClickForKeyboardFocus
mouseOverForKeyboardFocus
mouseOverHalos
mouseOverHalosChanged
multipleTextUndo
noWindowAnimationForClosing
offerThemesMenu
okayToChangeProjectLocalnessOf:
oliveHandleForScriptedObjects
optionalButtons
optionalButtonsChanged
outOfTheBox
packageBrowserWindowColor
parameterAt:
parameterAt:default:
parameterAt:ifAbsent:
parameterAt:ifAbsentPut:
passwordsOnPublish
personal
postscriptStoredAsEPS
preferenceAt:
preferenceAt:ifAbsent:
preferenceBrowserWindowColor
preferenceObjectsInCategory:
preferencesPanelWindowColor
preserveCommandExcursions
preserveTrash
printStandardSystemFonts
projectViewsInWindows
projectZoom
projectsSentToDisk
promptForUpdateServer
promptOnRefactoring
purgeUndoOnQuit
raiseDeprecatedWarnings
readDocumentAtStartup
readOnlyMode
refreshFontSettings
removeObsolete
removePreference:
resetHaloSpecifications
restartAlsoProceeds
restoreDefaultFonts
restoreDefaultMenuParameters
restorePersonalPreferences
restorePreferencesFromDisk
reverseWindowStagger
roundedCornersString
roundedMenuCorners
roundedWindowCorners
roundedWindowCornersChanged
rulesAccessSelector
rulesGlobalName
savePersonalPreferences
scrollBarColor
scrollBarWidth
scrollBarsNarrow
scrollBarsOnRight
scrollBarsWithoutMenuButton
securityChecksEnabled
seeClassSide
All the code for Preferences is on the class side
selectiveHalos
serverMode
setArrowheads
setBalloonHelpFontTo:
setButtonFontTo:
setCodeFontTo:
setDefaultAnnotationInfo
setDefaultFonts:
setDemoFonts
setEToysFontTo:
setEToysTitleFontTo:
setFlag:toValue:during:
setFlapsFontTo:
setHaloLabelFontTo:
setListFontTo:
setMenuFontTo:
setNotificationParametersForStandardPreferences
setPaintBoxButtonFontTo:
setParameter:to:
setPreference:toValue:
setPreferencesFrom:
setSystemFontTo:
setWindowColorFor:to:
setWindowTitleFontTo:
sharedFlapsSettingChanged
showBoundsInHalo
showChooseGraphicHaloHandle
showDeprecationWarnings
showDirectionForSketches
showDirectionHandles
showFlapsWhenPublishing
showObjectClassInInspector
showObjectMethodsInInspector
showSecurityStatus
showSharedFlaps
showSplitterHandles
showTextEditingState
showTypesEntriesInInspector
showUpdateOptionInWorldMenu
showWorldMainDockingBar
showWorldTaskbar
signProjectFiles
simpleFullHaloSpecifications
slideDismissalsToTrash
smartUpdating
smartUpdatingChanged
soundEnablingString
soundQuickStart
soundStopWhenDone
soundTheme
soundsEnabled
staggerPolicyString
standaloneSecurityChecksEnabled
standardBalloonHelpFont
standardButtonFont
standardCodeFont
standardDefaultTextFont
standardEToysFont
standardEToysTitleFont
standardFlapFont
standardHaloLabelFont
standardListFont
standardMenuFont
standardPaintBoxButtonFont
standardSystemFont
startInUntrustedDirectory
storePreferencesIn:
storePreferencesToDisk
subPixelRenderColorFonts
subPixelRenderFonts
suppressWindowTitlesInInstanceBrowsers
swapControlAndAltKeys
swapMouseButtons
syntaxHighlightingAsYouType
syntaxHighlightingAsYouTypeAnsiAssignment
syntaxHighlightingAsYouTypeLeftArrowAssignment
systemWindowEmbedOK
tabAmongFields
testRunnerWindowColor
textHighlightColor
textHighlightColor:
themeChoiceButtonOfColor:font:
tinyDisplay
toggleMenuColorPolicy
togglePreference:
toggleRoundedCorners
toggleSoundEnabling
toggleWindowPolicy
transcriptWindowColor
turnOffPowerManager
uiTheme
uniqueNamesInHalos
unlimitedPaintArea
updateFromServerAtStartup
updateSavesFile
upgradeIsMerge
useCategoryListsInViewers
useFormsInPaintBox
useFormsInPaintBox:
useLocale
useNewDiffToolsForMC
useOnlyServicesInMenu
useRBASTForPrettyPrint
useServicesInBrowserButtonBar
useSmartLabels
useThemeSounds
useUndo
valueOfFlag:
valueOfFlag:ifAbsent:
valueOfPreference:
valueOfPreference:ifAbsent:
versionsBrowserWindowColor
visualExplorer
visualizations
wantsChangeSetLogging
warnAboutInsecureContent
warnIfNoChangesFile
warnIfNoSourcesFile
windowAnimation
windowAnimationDelay
windowAnimationSteps
windowColorFor:
windowColorHelp
windowColorPreferenceForClassNamed:
windowColorTable
windowTitleFont
windowTitleStyle
windowsActiveOnFirstClick
wordStyleCursorMovement
workspaceWindowColor
worldTaskbarWindowPreview
PrettyPrinting
A PrettyPrinting is xxxxxxxxx.
Instance Variables
initialize
Subclasses should redefine this method to perform initializations on instance creation
prettyPrinterClassFor:
PrettyTextDiffBuilder
A PrettyTextDiffBuilder is xxxxxxxxx.
Instance Variables
sourceClass: <Object>
sourceClass
- xxxxx
from:to:inClass:
sourceClass:
split:
Project
A Project stores the state of a complete Squeak desktop, including
the windows, and the currently active changeSet. A project knows who
its parent project is. When you change projects, whether by entering
or exiting, the screen state of the project being exited is saved in
that project.
A project is retained by its view in the parent world. It is
effectively named by the name of its changeSet, which can be changed
either by renaming in a changeSorter, or by editing the label of its
view from the parent project.
As the site of major context switch, Projects are the locus of
swapping between the old MVC and the new Morphic worlds. The
distinction is based on whether the variable 'world' contains a
WorldMorph or a ControlManager.
Saving and Loading
Projects may be stored on the disk in external format. (Project
named: 'xxx') exportSegment, or choose 'store project on file...'.
Projects may be loaded from a server and stored back. Storing on a
server never overwrites; it always makes a new version. A project
remembers the url of where it lives in urlList. The list is length
one, for now. The url may point to a local disk instead of a server.
All projects that the user looks at, are cached in the Squeaklet
folder. Sorted by server. The cache holds the most recent version
only.
When a project is loaded into Squeak, its objects are converted to
the current version. There are three levels of conversion. First,
each object is converted from raw bits to an object in its old
format. Then it is sent some or all of these messages:
comeFullyUpOnReload: smartRefStream Used to
re-discover an object that already exists in this image, such as a
resource, global variable, Character, or Symbol. (sent to objects in
outPointers)
convertToCurrentVersion: varDict refStream: smartRefStrm
fill in fields that have been added to a class since
the object was stored. Used to set the extra inst var to a default
value. Or, return a new object of a different class. (sent to
objects that changed instance variables)
fixUponLoad: aProject refStream: smartRefStrm
change the object due to conventions that have changed on the
project level. (sent to all objects in the incoming project)
Here is the calling sequence for storing out a Project:
Project saveAs
Project storeOnServer
Project storeOnServerWithProgressInfo
Project storeOnServerInnards
Project exportSegmentFileName:directory:
Project exportSegmentWithChangeSet:fileName:directory:
ImageSegment writeForExportWithSources:inDirectory:changeSet:
---------
Isolation (not used any more)
When you accept a method, the entire system feels the change, except
projects that are "isolated". In an isolated project, all new global
variables (including new classes) arestored in the project-local
environment, and all changes to preexisting classes are revoked when
you leave the project. When you enter another project, that
project's changes are invoked. Invocation and revocation are handled
efficiently by swapping pointers. To make a project be isolated,
choose 'isolate changes of this project' from the 'changes...'
section of the screen menu. You can use an isolated project for
making dangerous change to a system, and you can get out if it
crashes. A foreign application can have the separate environment it
wants. Also, you can freeze part of the system for a demo that you
don't want to disturb. An isolated project shares methods with all
subprojects inside it, unless they are isolated themselves. Each
isolated project is the head of a tree of projects with which it
shares all methods.
You may 'assert' all changes ever made in the current project to take
effect above this project. This amounts to exporting all the globals
in the current environment, and zapping the revocation lists to that
the current state of the world will remain in force upon exit from
this project.
[Later: A project may be 'frozen'. Asserts do not apply to it after
that. (Great for demos.) You should be informed when an assert was
blocked in a frozen project.]
Class definitions are layered by the isolation mechanism. You are
only allowed to change the shape of a class in projects that lie
within its isolation scope. All versions of the methods are
recompiled, in all projects. If you remove an inst var that is in
use in an isolated project, it will become an Undeclared global. It
is best not to remove an inst var when it is being used in another
isolated project. [If we recompile them all, why can't we diagnose
the problem before allowing the change??]
Senders and Implementors do not see versions of a method in isolated
projects. [again, we might want to make this possible at a cost].
When you ask for versions of a method, you will not get the history
in other isolated projects.
Moving methods and classes between changeSets, and merging changeSets
has no effect on which methods are in force. But, when you look at a
changeSet from a different isolated project, the methods will contain
code that is not in force. A changeSet is just a list of method
names, and does not keep separate copies of any code.
When finer grained assertion is needed, use the method (aProject
assertClass: aClass from: thisProject warn: warnConflicts).
How isolated changes work: The first time a class changes, store its
MethodDictionary object. Keep parallel arrays of associations to
Classes and MethodDictionaries. Traverse these and install them when
you enter an "ioslated project". When you leave, store this
project's own MethodDictionaries there.
To do an assert, we must discover which methods changed here,
and which changed only in the project we are asserting into. There
is one copy of the 'virgin' method dictionaries in the system. It is
always being temporarily stored by the currently inForce isolated
project.
isolatedHead - true for the top project, and for each isolated
project. false or nil for any subproject that shares all methods
with its parent project.
inForce - true if my methods are installed now. false if I am
dormant. [is this equivalent to self == Project Current?]
classArray - list of associations to classes
methodDictArray - the method dictionaries of those classes before we
started changing methods. They hang onto the original
compiledMethods. (If this project is dormant, it contains the method
dictionaries of those classes as they will be here, in this project).
orgArray - the class organizations of the classes in classArray.
UsingIsolation (class variable) - No longer used.
When you want to save a project in export format from within that
very project, it gets tricky. We set two flags in parentProject,
exit to it, and let parentProject write the project.
ProjectViewMorph in parentProject checks in its step method, does the
store, clears the flags, and reenters the subProject.
abortResourceLoading
Abort loading resources
addDependent:
Projects do not keep track of their dependents, lest they point into other projects and thus foul up the tree structure for image segmentation.
addItem:toMenu:selection:
addItem:toMenu:selection:project:
addSubProjectNamesTo:indentation:
Add the names of the receiver and all its subprojects, and all *their* subprojects recursively, to aStream, indenting by the specified number of tab stops
addingProject:
advanceToNextProject
allMorphicProjects
allNames
allNamesAndProjects
allProjects
assureFlapIntegrity
Make certain that the items on the disabled-global-flap list are actually
global flaps, and if not, get rid of them. Also, old (and damaging)
parameters that held references to actual disabled flaps are cleansed
assureIntegerVersion
For converting the project versions
assureMainDockingBarPresenceMatchesPreference
Syncronize the state of the receiver's dockings with the
preference
assureTaskbarPresenceMatchesPreference
Synchronize the state of the receiver's taskbar with the preference.
backgroundColorForMorphicProject
beIsolated
Establish an isolation layer at this project.
This requires clearing the current changeSet or installing a new one.
beep
bumpVersion:
Make a new version after the previous version number
canDiscardEdits
Don't regard a window of mine as one to be discarded as part of a 'closeUnchangedWindows' sweep
canWeLoadAProjectNow
changeSet
chooseNaturalLanguage
Put up a menu allowing the user to choose the natural language for the project
cleanseDisabledGlobalFlapIDsList
Make certain that the items on the disabled-global-flap list are actually
global flaps, and if not, get rid of them
compileAll:from:
Make sure that shadowed methods in isolation layers get recompiled.
Traversal is done elsewhere. This simply handles the current project.
compileAllIsolated:from:
Whenever a recompile is needed in a class, look in other isolated projects for saved methods and recompile them also.
At the time this method is called, the recompilation has already been done for the project now in force.
compressFilesIn:to:in:resources:
Compress all the files in tempDir making up a zip file in localDirectory named localName
couldBeSwappedOut
createOrUpdateMainDockingBar
Private - create a new main docking bar or update the current one
createTaskbarIfNecessary
Private - create a new taskbar if not present.
createViewIfAppropriate
current
currentStack:
Set the current stack as indicated; if the parameter supplied is nil, delete any prior memory of the CurrentStack
currentVersionNumber
decideAboutCreatingBlank:
20 Oct - just do it
defaultBackgroundColor
Answer the color to be used as the base window color for a window whose model is an object of the receiver's class
deletingProject:
Clear my previousProject link if it points at the given Project, which is being deleted.
depth
Return the depth of this project from the top.
topProject = 0, next = 1, etc.
displayDepth:
displayFontProgress
Display progress for fonts
displayZoom:
Show the project transition when entering a new project
doArmsLengthCommand:
We are no longer the active project, so do it
doWeWantToRename
downloadUrl
^(self primaryServerIfNil: [^'']) downloadUrl
ensureChangeSetNameUnique
enter
Enter the new project
enter:
enter:revert:saveForRevert:
Install my ChangeSet, Transcript, and scheduled views as current
globals. If returningFlag is true, we will return to the project from
whence the current project was entered; don't change its
previousProject link in this case.
If saveForRevert is true, save the ImageSegment of the project being
left. If revertFlag is true, make stubs for the world of the project being
left. If revertWithoutAsking is true in the project being left, then
always revert.
enterAsActiveSubprojectWithin:
Install my ChangeSet, Transcript, and scheduled views as current globals.
If returningFlag is true, we will return to the project from whence the current project was entered; don't change its previousProject link in this case.
If saveForRevert is true, save the ImageSegment of the project being left.
If revertFlag is true, make stubs for the world of the project being left.
If revertWithoutAsking is true in the project being left, then always revert.
enterForEmergencyRecovery
This version of enter invokes an absolute minimum of mechanism.
An unrecoverable error has been detected in an isolated project.
It is assumed that the old changeSet has already been revoked.
No new process gets spawned here. This will happen in the debugger.
exit
Leave the current project and return to the project in which this one was created.
fileOut
finalExitActions
findProjectView:
In this world, find the morph that holds onto the project described by projectDescription. projectDescription can be a project, or the name of a project. The project may be represented by a DiskProxy. The holder morph may be at any depth in the world.
Need to fix this if Projects have subclasses, or if a class other than ProjectViewMorph can officially hold onto a project. (Buttons, links, etc)
If parent is an MVC world, return the ProjectController.
flapsSuppressed
Answer whether flaps are suppressed in this project
flapsSuppressed:
Make the setting of the flag that governs whether global flaps are suppressed in the project be as indicated and add or remove the actual flaps
forget:
forgetExistingURL
fromMyServerLoad:
If a newer version of me is on the server, load it.
globalFlapEnabledString:
Answer the string to be shown in a menu to represent the status of the givne flap regarding whether it it should be shown in this project.
globalFlapWithIDEnabledString:
Answer the string to be shown in a menu to represent the status of the given flap regarding whether it it should be shown in this project.
hasBadNameForStoring
htmlPagePrototype
Return the HTML page prototype
imageForm
imageFormOfSize:depth:
initMorphic
Written so that Morphic can still be removed. Note that #initialize is never actually called for a morphic project -- see the senders of this method.
initialExtent
Answer the desired extent for the receiver when a view on it is first opened on the screen.
5/22/96 sw: in the absence of any override, obtain from RealEstateAgent
initialProject
initialize
Initialize the project, seting the CurrentProject as my parentProject and initializing my project preferences from those of the CurrentProject
initializeProjectParameters
Initialize the project parameters.
initializeProjectPreferences
Initialize the project's preferences from currently-prevailing preferences that are currently being held in projects in this system
installNewDisplay:depth:
When entering a new project, install a new Display if necessary.
installPasteUpAsWorld:
(ProjectViewMorph newMorphicProjectOn: aPasteUpMorph) openInWorld.
installProjectPreferences
Install the settings of all preferences presently held individually by projects in the receiver's projectPreferenceFlagDictionary
interruptName:
interruptName:preemptedProcess:
invoke
Install all methods changed here into method dictionaries.
Make my versions be the ones that will be called.
invokeFrom:
Revoke the changes in force for this project, and then invoke those in force for otherProject. This method shortens the process to the shortest path up then down through the isolation layers.
isBadNameForStoring:
isCurrentProject
isFlapEnabled:
Answer whether the given flap tab is enabled in this project
isFlapIDEnabled:
Answer whether a flap of the given ID is enabled in this project
isIsolated
isMorphic
Complexity is because #isMVC is lazily installed
isTopProject
Return true only if this is the top project (its own parent).
Also include the test here for malformed project hierarchy.
isolationHead
Go up the parent chain and find the nearest isolated project.
isolationSet
Return the changeSet for this isolation layer or nil
jumpToSelection:
labelString
lastDirectory:
lastSavedAtSeconds
layersToTop
Return an OrderedCollection of all the projects that are isolation layers from this one up to the top of the project hierarchy, inclusive.
loaderUrl
localeChanged
Set the project's natural language as indicated
localeID
Answer the natural language for the project
makeThumbnail
Make a thumbnail image of this project from the Display.
maybeForkInterrupt
mostRecent:onServer:
moveCollapsedWindowsToTaskbar
Move collapsed windows to the taskbar.
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
nameAdjustedForDepth
Answer the name of the project, prepended with spaces reflecting the receiver's depth from the top project
named:
named:in:
namedUrl:
namedWithDepth:
naturalLanguage
Answer the natural language for the project
navigatorFlapVisible
Answer whether a Navigator flap is visible
new
newMorphic
newMorphicOn:
nextProject
noteThatParameter:justChangedTo:
Provides a hook so that a user's toggling of a project parameter might precipitate some immediate action
objectForDataStream:
I am about to be written on an object file. Write a path to me in the other system instead.
obsolete
ofWorld:
openBlankProjectNamed:
parameterAt:
parameterAt:ifAbsent:
parent
parseProjectFileName:
previousProject
primaryServer
Return my primary server, that is the one I was downloaded from or are about to be stored on.
primaryServerIfNil:
Return my primary server, that is the one I was downloaded from or are about to be stored on. If none is set execute the exception block
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
projectChangeSet
projectExtension
projectParameterAt:
Answer the project parameter stored at the given symbol, or nil if none
projectParameterAt:ifAbsent:
Answer the project parameter stored at the given symbol, or the result of evaluating the block
projectParameterAt:ifAbsentPut:
Return the project parameter setting at the given key. If there is no entry for this key in the Parameters dictionary, create one with the value of defaultValueBlock as its value
projectParameterAt:put:
Set the given project parameter to the given value
projectParameters
projectPreferenceAt:
Answer the project preference stored at the given symbol. If there is none in the local preference dictionary, it must be because it was only latterly declared to be a project-local preference, so obtain its initial value instead from the last-known global or default setting
projectPreferenceAt:ifAbsent:
Answer the project preference stored at the given symbol, or the result of evaluating the block
projectPreferenceFlagDictionary
Answer the dictionary that holds the project preferences, creating it if necessary
propagateChanges
Assert these changes in the next higher isolation layer of the system.
rawParameters
rebuildAllProjects
release
Remove references to objects that may refer to the receiver. This message
should be overridden by subclasses with any cycles, in which case the
subclass should also include the expression super release.
removeAll:
removeAllButCurrent
removeMainDockingBar
Remove the receiver's main docking bars
removeParameter:
removeTaskbar
Remove the receiver's taskbars.
renameTo:
If the receiver has an inherent idea about its own name, it should take action here. Any object that might be pointed to in the References dictionary might get this message sent to it upon reload
resourceDirectoryName
Project current resourceDirectoryName
resourceManager
resourceManager:
resourceUrl
compose my base url for resources on the server
resumeProcess:
returnToPreviousProject
revert
Exit this project and do not save it. Warn user unless in dangerous projectRevertNoAsk mode. Exit to the parent project. Do a revert on a clone of the segment, to allow later reverts.
revoke
Take back all methods changed here.
Install the original method dictionaries and organizations.
The orignal method versions will now be the ones used.
saveAs
Forget where stored before, and store. Will ask user where.
saveForRevert
Exit to the parent project. Do a GC. Save the project in a segment. Record the ImageSegment object as the revertToMe in Project parameters
saveProjectPreferences
Preserve the settings of all preferences presently held individually by projects in the receiver's projectPreferenceFlagDictionary
saveState
Save the current state in me prior to leaving this project
serverList
Take my list of server URLs and return a list of ServerDirectories to write on.
setChangeSet:
setFlaps
setPaletteFor:
setParent:
setProjectHolder:
setServer
Mark me as a new project. See if a server is known, remember it.
setThumbnail:
setViewSize:
showSharedFlaps
Answer whether shared flaps are shown or suppressed in this project
showWorldMainDockingBar
showWorldMainDockingBar:
Change ther receiver to show the main docking bar
showWorldMainDockingBarString
showWorldTaskbar
Answer whether the taskbar should exist in this project.
showWorldTaskbar:
Change the receiver to show the taskbar.
showZoom
Decide if user wants a zoom transition, and if there is enough memory to do it.
spawnNewProcess
spawnNewProcessAndTerminateOld:
spawnNewProcessIfThisIsUI:
squeakletDirectory
startResourceLoading
Abort loading resources
storeAllInSegments
storeAttributeKey:value:on:
storeAttributesOn:
storeDataOn:
Write me out. All references to other projects are weak references. They only go out if they are written for another reason.
storeHtmlPageIn:
Prepare the HTML wrapper for the current project
storeManifestFileIn:
storeNewPrimaryURL:
storeResourceList:in:
Store a list of all used resources in the given directory. Used for maintenance.
storeSegment
Store my project out on the disk as an ImageSegment. Keep the
outPointers in memory. Name it <project name>.seg. *** Caller must be
holding (Project alInstances) to keep subprojects from going out. ***
storeSegmentNoFile
For testing. Make an ImageSegment. Keep the outPointers in memory.
Also useful if you want to enumerate the objects in the segment
afterwards (allObjectsDo:)
storeSomeSegment
Try all projects to see if any is ready to go out. Send at most three of them.
Previous one has to wait for a garbage collection before it can go out.
storeToMakeRoom
Write out enough projects to fulfill the space goals.
Include the size of the project about to come in.
subProjects
Answer a list of all the subprojects of the receiver. This is nastily
idiosyncratic.
suppressFlapsString
thumbnail
toggleFlapsSuppressed
Project toggleFlapsSuppressed
toggleShowWorldMainDockingBar
topProject
uiProcess
updateLocaleDependents
Set the project's natural language as indicated
url
compose my url on the server
urlList
versionForFileName
Project current versionForFileName
versionForFileName:
versionFrom:
Store the version of the file I actually came from. My stored version was recorded before I knew the latest version number on the server!
versionedFileName
Project current versionedFileName
viewLocFor:
Look for a view of the exitedProject, and return its center
viewSize
windowActiveOnFirstClick
Return true if my window should be active on first click.
windowReqNewLabel:
My window's title has been edited.
Return true if this is OK, and override for further behavior.
world
writeFileNamed:fromDirectory:toServer:
ProjectLauncher
A ProjectLauncher is xxxxxxxxx.
Instance Variables
eToyAuthentificationServer: <Object>
showSplash: <Object>
splashURL: <Object>
whichFlaps: <Object>
eToyAuthentificationServer
- xxxxx
showSplash
- xxxxx
splashURL
- xxxxx
whichFlaps
- xxxxx
hideSplashMorph
initialize
Subclasses should redefine this method to perform initializations on instance creation
installProjectFrom:
setupFromParameters
showSplash
showSplashMorph
splashMorph
splashMorph:
startUp
A backstop for subclasses. Note that this is not a class message (most startUps are class messages).
startUpAfterLogin
ProjectLoading
A ProjectLoading is xxxxxxxxx.
Instance Variables
bestAccessToFileName:andDirectory:
installRemoteNamed:from:named:in:
openFromFile:fromDirectory:withProjectView:
openName:stream:fromDirectory:withProjectView:
projectStreamFromArchive:
useTempChangeSet
PseudoClass
I provide an inert model of a Class, used by FileContentsBrowser to manipulate filedout code. Instead of a method dictionary or selectors onto CompiledMethods, I have a dictionary ("source") of selectors onto ChangeRecords, which were, in the case of FileContentsBrowser, parsed from a source or change set file.
addMethodChange:
allCallsOn
allInstVarNames
allSubclassesWithLevelDo:startingLevel:
allSuperclasses
asClassDefinition
bindingOf:
classComment:
classNotDefined
classPool
comment
comment:
commentString
commentString:
compilerClass
confirmRemovalOf:
definition
definition:
evaluate:
exists
fileIn
FileIn the receiver
fileInCategory:
fileInDefinition
fileInMethod:
fileInMethods
fileInMethods:
FileIn all methods with selectors taken from aCollection
fileOut
fileOutCategory:
fileOutDefinitionOn:
fileOutMethod:
fileOutMethods:on:
FileOut all methods with selectors taken from aCollection
fileOutMethodsOn:
fileOutOn:
FileOut the receiver
fullName
hasChanges
hasComment
hasDefinition
hasMetaclass
instVarNames
isMeta
isTrait
literalScannedAs:notifying:
makeSureClassExists:
makeSureSuperClassExists:
metaClass
methodChange:
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
name:
nameExists
needsInitialize
organization
parserClass
prettyPrinterClass
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
realClass
removeAllUnmodified
removeCategory:
removeMethod:
removeSelector:
removeUnmodifiedMethods:
removedCategoryName
renameTo:
If the receiver has an inherent idea about its own name, it should take action here. Any object that might be pointed to in the References dictionary might get this message sent to it upon reload
selectors
sharedPools
sourceCode
sourceCodeAt:
sourceCodeAt:put:
sourceCodeTemplate
stampAt:
Answer the authoring time-stamp of the change
theMetaClass
theNonMetaClass
Sent to a class or metaclass, always return the class
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.
PseudoClassOrganizer
A PseudoClassOrganizer is xxxxxxxxx.
Instance Variables
classComment
Answer the comment associated with the object that refers to the receiver.
classComment:
Store the comment, aString, associated with the object that refers to the
receiver.
setDefaultList:
PseudoMetaclass
A PseudoMetaclass is xxxxxxxxx.
Instance Variables
fullName
isMeta
realClass
theNonMetaClass
Sent to a class or metaclass, always return the class
RealEstateAgent
Responsible for real-estate management on the screen, which is to say, controlling where new windows appear, with what sizes, etc. 5/20/96 sw
assignCollapseFrameFor:
assignCollapsePointFor:
initialFrameFor:
initialFrameFor:initialExtent:
initialFrameFor:initialExtent:world:
initialFrameFor:world:
initialize
Subclasses should redefine this method to perform initializations on instance creation
maximumUsableArea
maximumUsableAreaInWorld:
reduceByFlaps:
screenTopSetback
scrollBarSetback
standardPositions
standardPositionsInWorld:
standardWindowExtent
strictlyStaggeredInitialFrameFor:initialExtent:
strictlyStaggeredInitialFrameFor:initialExtent:world:
windowColumnsDesired
windowRowsDesired
RecategorizedEvent
A RecategorizedEvent is xxxxxxxxx.
Instance Variables
oldCategory: <Object>
oldCategory
- xxxxx
changeKind
class:category:oldCategory:
isRecategorized
method:protocol:class:oldProtocol:
oldCategory
oldCategory:
printEventKindOn:
supportedKinds
ReferenceStream
This is a way of serializing a tree of objects into disk file. A ReferenceStream can store
one or more objects in a persistent form, including sharing and cycles.
Here is the way to use DataStream and ReferenceStream:
rr _ ReferenceStream fileNamed: 'test.obj'.
rr nextPut: <your object>.
rr close.
To get it back:
rr _ ReferenceStream fileNamed: 'test.obj'.
<your object> _ rr next.
rr close.
ReferenceStreams can now write "weak" references. nextPutWeak:
writes a "weak" reference to an object, which refers to that object
*if* it also gets written to the stream by a normal nextPut:.
A ReferenceStream should be treated as a read-stream *or* as a write-stream, *not* as a read/write-stream. The reference-remembering mechanism would probably do bad things if you tried to read and write from the same ReferenceStream.
[TBD] Should we override "close" to do (self forgetReferences)?
Instance variables
references -- an IdentityDictionary mapping objects already written
to their byteStream positions. If asked to write any object a
second time, we just write a reference to its stream position.
This handles shared objects and reference cycles between objects.
To implement "weak references" (for Aliases), the references
dictionary also maps objects not (yet?) written to a Collection
of byteStream positions with hopeful weak-references to it. If
asked to definitely write one of these objects, we'll fixup those
weak references.
objects -- an IdentityDictionary mapping relative byte stream positions to
objects already read in. If asked to follow a reference, we
return the object already read.
This handles shared objects and reference cycles between objects.
currentReference -- the current reference position. Positon relative to the
start of object data in this file. (Allows user to cut and paste smalltalk
code from the front of the file without effecting the reference values.)
This variable is used to help install each new object in "objects" as soon
as it's created, **before** we start reading its contents, in
case any of its content objects reference it.
fwdRefEnds -- A weak reference can be a forward reference, which
requires advance-reading the referrent. When we later come to the
object, we must get its value from "objects" and not re-read it so
refs to it don't become refs to copies. fwdRefEnds remembers the
ending byte stream position of advance-read objects.
skipping -- true if <what?>
insideASegment -- true if we are being used to collect objects that will be
included in an ImageSegment. If so, UniClasses must be noted and traced.
If the object is referenced before it is done being created, it might get created twice. Just store the object the moment it is created in the 'objects' dictionary. If at the end, comeFullyUpOnReload returns a different object, some refs will have the temporary object (this is an unlikely case). At the moment, no implementor of comeFullyUpOnReload returns a different object except DiskProxy, and that is OK.
beginInstance:size:
This is for use by storeDataOn: methods. Cf. Object>>storeDataOn:.
beginReference:
Remember anObject as the object we read at the position recorded by
noteCurrentReference:. This must be done after instantiating anObject but
before reading any of its contents that might (directly or indirectly) refer to
it. (It's ok to do this redundantly, which is convenient for #next.)
Answer the reference position.
blockers
blockers:
maps objects -> nil if they should not be written. object -> anotherObject if they need substitution.
example2
getCurrentReference
PRIVATE -- Return the currentReference posn. Always a relative position. So user can cut and paste the Smalltalk source code at the beginning of the file.
insideASegment
insideASegment:
isAReferenceType:
Return true iff typeID is one of the classes that can be written as a reference to an instance elsewhere in the stream.
maybeBeginReference:
See if need to record a reference. In case in the file twice
next
Answer the next object in the stream. If this object was already read, don't re-read it. File is positioned just before the object.
nextPutWeak:
Write a weak reference to anObject to the receiver stream. Answer anObject.
If anObject is not a reference type of object, then just put it normally.
A 'weak' reference means: If anObject gets written this stream via nextPut:,
then its weak references will become normal references. Otherwise they'll
read back as nil. --
noteCurrentReference:
PRIVATE -- If we support references for type typeID, remember
the current byteStream position so beginReference: can add the
next object to the 'objects' dictionary of reference positions,
then return true. Else return false.
objectAt:
PRIVATE -- Read & return the object at a given stream position.
If we already read it, just get it from the objects dictionary.
(Reading it again wouldn't work with cycles or sharing.)
If not, go read it and put it in the objects dictionary.
NOTE: This resolves a cross-reference in the ReferenceStream:
1. A backward reference to an object already read (the normal case).
2. A forward reference which is a sated weak reference (we record where
the object ends so when we get to it normally we can fetch it from
'objects' and skip over it).
3. A backward reference to a 'non-reference type' per the long NOTE in
nextPut: (we compensate here--seek back to re-read it and add the object
to 'objects' to avoid seeking back to read it any more times).
4. While reading a foward weak reference (case 2), we may recursively hit an
ordinary backward reference to an object that we haven't yet read because
we temporarily skipped ahead. Such a reference is forward in time so we
treat it much like case 2.
11/16-24/92 jhm: Handle forward refs. Cf. class comment and above NOTE.
08:57 tk anInteger is a relative position
objectIfBlocked:
See if this object is blocked -- not written out and another object substituted.
on:
project
Return the project we are writing or nil
projectChangeSet
The changeSet of the project we are writing
refTypes:
references
replace:with:
We may wish to remember that in some field, the original object is being replaced by the proxy. For the hybred scheme that collects with a DummyStream and writes an ImageSegment, it needs to hold onto the originals so they will appear in outPointers, and be replaced.
reset
PRIVATE -- Reset my internal state.
11/15-17/92 jhm: Added transients and fwdRefEnds.
7/11/93 sw: Give substantial initial sizes to avoid huge time spent growing.
9/3/93 sw: monster version for Sasha
setCurrentReference:
PRIVATE -- Set currentReference to refPosn. Always a relative position.
setStream:
PRIVATE -- Initialization method.
setStream:reading:
PRIVATE -- Initialization method.
statisticsOfRefs
Analyze the information in references, the objects being written out
tryToPutReference:typeID:
PRIVATE -- If we support references for type typeID, and if
anObject already appears in my output stream, then put a
reference to the place where anObject already appears. If we
support references for typeID but didn't already put anObject,
then associate the current stream position with anObject in
case one wants to nextPut: it again.
Return true after putting a reference; false if the object still
needs to be put.
: Added support for weak refs. Split out outputReference:.
08:42 tk references stores relative file positions.
versionCode
RemovedEvent
A RemovedEvent is xxxxxxxxx.
Instance Variables
changeKind
isRemoved
printEventKindOn:
supportedKinds
RenamedEvent
A RenamedEvent is xxxxxxxxx.
Instance Variables
newName: <Object>
oldName: <Object>
newName
- xxxxx
oldName
- xxxxx
changeKind
class:category:oldName:newName:
classCategoryRenamedFrom:to:
isRenamed
newName
newName:
oldName
oldName:
printEventKindOn:
supportedKinds
ReorganizedEvent
A ReorganizedEvent is xxxxxxxxx.
Instance Variables
changeKind
isReorganized
printEventKindOn:
supportedKinds
ResourceCollector
The ResourceCollector collects resources that are encountered during project loading or publishing. It merely decouples the places where resources are held from the core object enumeration so that resources can be stored independently from what is enumerated for publishing.
baseUrl
baseUrl:
current
current:
forgetObsolete
Forget obsolete locators, e.g., those that haven't been referenced and not been stored on a file.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeFrom:
Initialize the receiver from aResourceManager.
localDirectory
localDirectory:
locatorMap
allow outsiders to store in it. For files that are not resources that do want to live in the resource directory locally and on the server. (.t files for example)
locators
locatorsDo:
noteResource:replacing:
Remember the fact that we need to load aResource which will replace anObject.
objectForDataStream:
This should never happen; when projects get written they must be decoupled from the resource collector. If you get the error message below something is seriously broken.
objectForDataStream:fromForm:
Return a replacement for aForm to be stored instead
removeLocator:
replaceAll
Replace all resources by their originals. Done after the resource have been collected to get back to the original state.
resourceDirectory
resourceFileNames
Return a list of all the resource files created
stubMap
writeResourceForm:fromLocator:
The given form has been externalized before. If it was reasonably compressed, use the bits of the original data - this allows us to recycle GIF, JPEG, PNG etc. data without using the internal compression (which is in most cases inferior). If necessary the data will be retrieved from its URL location. This retrieval is done only if the resouce comes from either
* the local disk (in which case the file has never been published)
* the browser cache (in which case we don't cache the resource locally)
In any other case we will *not* attempt to retrieve it, because doing so can cause the system to connect to the network which is probably not what we want. It should be a rare case anyways; could only happen if one clears the squeak cache selectively.
writeResourceForm:locator:
Store the given form on a file. Return an array with the name and the size of the file
ResourceLocator
Describes where a resource can be found.
Instance variables:
urlString <String> The URL of the resource
fileSize <Integer> The size of the resource
localFileName <String> When non-nil, the place where this resource was/is stored.
=
Answer whether the receiver and the argument represent the same
object. If = is redefined in any subclass, consider also redefining the
message hash.
adjustToDownloadUrl:
Adjust to the fully qualified URL for this resource.
adjustToRename:from:
Adjust to the fully qualified URL for this resource.
hasRemoteContents
Return true if we describe a resource which is non-local, e.g., on some remote server.
hash
Answer a SmallInteger whose value is related to the receiver's identity.
May be overridden, and should be overridden in any classes that define =
localFileName
localFileName:
make:relativeTo:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
resourceFileSize
resourceFileSize:
species
Answer the preferred class for reconstructing the receiver. For example,
collections create new collections whenever enumeration messages such as
collect: or select: are invoked. The new kind of collection is determined by
the species of the original collection. Species and class are not always the
same. For example, the species of Interval is Array.
urlString
urlString:
ResourceManager
A ResourceManager is xxxxxxxxx.
Instance Variables
loaded: <Object>
loaderProcess: <Object>
resourceMap: <Object>
stopFlag: <Object>
stopSemaphore: <Object>
unloaded: <Object>
loaded
- xxxxx
loaderProcess
- xxxxx
resourceMap
- xxxxx
stopFlag
- xxxxx
stopSemaphore
- xxxxx
unloaded
- xxxxx
abandonResourcesThat:
Private. Forget resources that match the given argument block
addCacheLocation:for:
addResource:locator:
addResource:url:
adjustToDownloadUrl:
Adjust the resource manager to the current download location. A project might have been moved manually to a different location or server.
adjustToNewServer:from:
Adjust the resource manager to the current download location. A project might have been moved manually to a different location or server.
adjustToRename:from:
Adjust the resource manager to the current download location. A project might have been moved manually to a different location or server.
cacheResource:inArchive:
cacheResource:stream:
convertMapNameForBackwardcompatibilityFrom:
fixJISX0208Resource
formChangedReminder
hackURL:
initialize
So resources may get garbage collected if possible
initializeFrom:
Initialize the receiver from the given resource collector. None of the resources have been loaded yet, so make register all resources as unloaded.
installResource:from:locator:
loadCachedResources
Load all the resources that we have cached locally
loadResource:fromCacheFileNamed:in:
loaderProcess
localizeAllExternalResources
Should be a preference later.
localizedExternalResources
lookupCachedResource:ifPresentDo:
lookupCachedResource:in:ifPresentDo:
lookupOriginalResourceCacheEntry:for:
makeAllProjectResourcesLocalTo:
Change the urls in the resource locators so project specific resources are stored and referenced locally. Project specific resources are all those that are kept locally in any of the project's versions.
preLoadFromArchive:cacheName:
Load the resources from the given zip archive
prioritizedUnloadedResources
Return an array of unloaded resource locators prioritized by some means
registerUnloadedResources
reloadCachedResources
relocatedExternalResource:
relocatedExternalResource:to:
renameCachedResource:to:
renameCachedResource:to:external:
reset
Clean out everything
resourceCache
resourceCacheName
resourceMap
startDownload
Start downloading unloaded resources
stopDownload
Stop downloading unloaded resources
updateResourcesFrom:
We just assembled all the resources in a project.
Include all that were newly found
RiscOSPlatform
A RiscOSPlatform is xxxxxxxxx.
Instance Variables
isActivePlatform
platformFamily
Returns a symbol specific to the platform family (MacOSX, Windows, Unix, RiscOS).
This may need to be extended if there are new platforms added or significant differences within a platform family arise (as was the case between MacOS 9 and X).
SARInstaller
I am an object that handles the loading of SAR (Squeak ARchive) files.
A SAR file is a Zip file that follows certain simple conventions:
* it may have a member named "install/preamble".
This member, if present, will be filed in as Smalltalk source code at the beginning of installation.
Typically, the code in the preamble will make whatever installation preparations are necessary,
and will then call methods in the "client services" method category to extract or install other zip members.
* It may have a member named "install/postscript".
This member, if present, will be filed in as Smalltalk source code at the end of installation.
Typically, the code in the postscript will set up the operating environment,
and will perhaps put objects in flaps, open projects or README files, or launch samples.
Within the code in the preamble and postscript, "self" is set to the instance of the SARInstaller.
If neither an "install/preamble" nor an "install/postscript" file is present,
all the members will be installed after prompting the user,
based on a best guess of the member file types that is based on member filename extensions.
This is new behavior.
basicNewChangeSet:
cardForSqueakMap:
changeSetNamed:
currentChangeSet
directory
directory:
directory:fileName:
ensurePackageWithId:
errorNoSuchMember:
extractMember:
Extract aMemberOrName to a file using its filename
extractMember:toFileNamed:
Extract aMemberOrName to a specified filename
extractMemberWithoutPath:
Extract aMemberOrName to its own filename, but ignore any directory paths, using my directory instead.
extractMemberWithoutPath:inDirectory:
Extract aMemberOrName to its own filename, but ignore any directory paths, using aDirectory instead
fileIn
File in to a change set named like my file
fileInFrom:
The zip has been saved already by the download.
Read the zip into my instvar, then file in the correct members
fileInMCVersion:withBootstrap:
This will use the MCBootstrapLoader to load a (non-compressed) Monticello file (.mc or .mcv)
fileInMemberNamed:
This is to be used from preamble/postscript code to file in zip members as ChangeSets.
fileInMonticelloPackageNamed:
This is to be used from preamble/postscript code to file in zip
members as Monticello packages (.mc).
fileInMonticelloVersionNamed:
This is to be used from preamble/postscript code to file in zip
members as Monticello version (.mcv) files.
fileInMonticelloZipVersionNamed:
This is to be used from preamble/postscript code to file in zip
members as Monticello version (.mcz) files.
fileInMorphsNamed:addToWorld:
This will load the Morph (or Morphs) from the given member.
Answers a Morph, or a list of Morphs, or nil if no such member or error.
If aBoolean is true, also adds them and their models to the World.
fileInPackageNamed:
This is to be used from preamble/postscript code to file in zip
members as DVS packages.
fileInTrueTypeFontNamed:
fileIntoChangeSetNamed:fromStream:
Not recommended for new code
fileName
fileName:
fileReaderServicesForFile:suffix:
getMCBootstrapLoaderClass
importImage:
initialize
Subclasses should redefine this method to perform initializations on instance creation
installAllMembers
Try to install all the members, in order, based on their filenames and/or contents.
installMember:
installSAR:
installed:
installedMemberNames
Answer the names of the zip members that have been installed already.
installedMembers
Answer the zip members that have been installed already.
loadDVS
loadMonticello
loadMonticelloCVS
memberNameForProjectNamed:
Answer my member name for the given project, or nil.
Ignores version numbers and suffixes, and also unescapes percents in filenames.
memberNamed:
memberNames
membersMatching:
newCardForSqueakMap:
newChanges:
openGraphicsFile:
openTextFile:
Open a text window on the given member
prependedDataSize
serviceFileInSAR
services
squeakMapDo:
squeakMapPackageID
squeakMapPackageVersion
uninstalledMemberNames
Answer the names of the zip members that have not yet been installed.
uninstalledMembers
Answer the zip members that haven't been installed or extracted yet.
unload
withCurrentChangeSetNamed:do:
zip
zip:
zipFileComment
SHA1
This class implements the Secure Hash Algorithm (SHA) described in the U.S. government's Secure Hash Standard (SHS). This standard is described in FIPS PUB 180-1, "SECURE HASH STANDARD", April 17, 1995.
The Secure Hash Algorithm is also described on p. 442 of 'Applied Cryptography: Protocols, Algorithms, and Source Code in C' by Bruce Scheier, Wiley, 1996.
See the comment in class DigitalSignatureAlgorithm for details on its use.
Implementation notes:
The secure hash standard was created with 32-bit hardware in mind. All arithmetic in the hash computation must be done modulo 2^32. This implementation uses ThirtyTwoBitRegister objects to simulate hardware registers; this implementation is about six times faster than using LargePositiveIntegers (measured on a Macintosh G3 Powerbook). Implementing a primitive to process each 64-byte buffer would probably speed up the computation by a factor of 20 or more.
blockSize
constantForStep:
Answer the constant for the i-th step of the block hash loop. We number our steps 1-80, versus the 0-79 of the standard.
expandedBlock:
Convert the given 64 byte buffer into 80 32-bit registers and answer the result.
finalHash
Concatenate the final totals to build the 160-bit integer result.
hashFunction:of:with:with:
Compute the hash function for the i-th step of the block hash loop. We number our steps 1-80, versus the 0-79 of the standard.
hashInteger:
Hash the given positive integer. The integer to be hashed should have 512 or fewer bits. This entry point is used in key generation.
hashInteger:seed:
Hash the given positive integer. The integer to be hashed should have 512 or fewer bits. This entry point is used in the production of random numbers
hashSize
hashStream:
Hash the contents of the given stream from the current position to the end using the Secure Hash Algorithm. The SHA algorithm is defined in FIPS PUB 180-1. It is also described on p. 442 of 'Applied Cryptography: Protocols, Algorithms, and Source Code in C' by Bruce Scheier, Wiley, 1996.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeTotals
Initialize totalA through totalE to their seed values.
initializeTotalsArray
Initialize the totals array from the registers for use with the primitives.
primExpandBlock:into:
Expand the given 64-byte buffer into the given Bitmap of length 80.
primHasSecureHashPrimitive
Answer true if this platform has primitive support for the Secure Hash Algorithm.
primHashBlock:using:
Hash the given block (a Bitmap) of 80 32-bit words, using the given workingTotals.
processBuffer:
Process given 64-byte buffer, accumulating the results in totalA through totalE.
processBufferUsingPrimitives:
Process given 64-byte buffer using the primitives, accumulating the results in totals.
processFinalBuffer:bitLength:
Process given buffer, whose length may be <= 64 bytes, accumulating the results in totalA through totalE. Also process the final padding bits and length.
storeLength:in:
Fill in the final 8 bytes of the given ByteArray with a 64-bit big-endian representation of the original message length in bits.
SecureHashAlgorithm
This class implements the Secure Hash Algorithm (SHA) described in the U.S. government's Secure Hash Standard (SHS). This standard is described in FIPS PUB 180-1, "SECURE HASH STANDARD", April 17, 1995.
The Secure Hash Algorithm is also described on p. 442 of 'Applied Cryptography: Protocols, Algorithms, and Source Code in C' by Bruce Scheier, Wiley, 1996.
See the comment in class DigitalSignatureAlgorithm for details on its use.
Implementation notes:
The secure hash standard was created with 32-bit hardware in mind. All arithmetic in the hash computation must be done modulo 2^32. This implementation uses ThirtyTwoBitRegister objects to simulate hardware registers; this implementation is about six times faster than using LargePositiveIntegers (measured on a Macintosh G3 Powerbook). Implementing a primitive to process each 64-byte buffer would probably speed up the computation by a factor of 20 or more.
constantForStep:
Answer the constant for the i-th step of the block hash loop. We number our steps 1-80, versus the 0-79 of the standard.
expandedBlock:
Convert the given 64 byte buffer into 80 32-bit registers and answer the result.
finalHash
Concatenate the final totals to build the 160-bit integer result.
hashFunction:of:with:with:
Compute the hash function for the i-th step of the block hash loop. We number our steps 1-80, versus the 0-79 of the standard.
hashInteger:
Hash the given positive integer. The integer to be hashed should have 512 or fewer bits. This entry point is used in key generation.
hashInteger:seed:
Hash the given positive integer. The integer to be hashed should have 512 or fewer bits. This entry point is used in the production of random numbers
hashMessage:
Hash the given message using the Secure Hash Algorithm.
hashStream:
Hash the contents of the given stream from the current position to the end using the Secure Hash Algorithm. The SHA algorithm is defined in FIPS PUB 180-1. It is also described on p. 442 of 'Applied Cryptography: Protocols, Algorithms, and Source Code in C' by Bruce Scheier, Wiley, 1996.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeTotals
Initialize totalA through totalE to their seed values.
initializeTotalsArray
Initialize the totals array from the registers for use with the primitives.
primExpandBlock:into:
Expand the given 64-byte buffer into the given Bitmap of length 80.
primHasSecureHashPrimitive
Answer true if this platform has primitive support for the Secure Hash Algorithm.
primHashBlock:using:
Hash the given block (a Bitmap) of 80 32-bit words, using the given workingTotals.
processBuffer:
Process given 64-byte buffer, accumulating the results in totalA through totalE.
processBufferUsingPrimitives:
Process given 64-byte buffer using the primitives, accumulating the results in totals.
processFinalBuffer:bitLength:
Process given buffer, whose length may be <= 64 bytes, accumulating the results in totalA through totalE. Also process the final padding bits and length.
storeLength:in:
Fill in the final 8 bytes of the given ByteArray with a 64-bit big-endian representation of the original message length in bits.
SecurityManager
A SecurityManager is xxxxxxxxx.
Instance Variables
keysFileName: <Object>
privateKeyPair: <Object>
trustedKeys: <Object>
keysFileName
- xxxxx
privateKeyPair
- xxxxx
trustedKeys
- xxxxx
addTrustedKey:
Add a public key to the list of trusted keys
canWriteImage
SecurityManager default canWriteImage
default
disableFileAccess
SecurityManager default disableFileAccess
disableImageWrite
SecurityManager default disableImageWrite
disableSocketAccess
SecurityManage default disableSocketAccess
enterRestrictedMode
Some insecure contents was encountered. Close all doors and proceed.
fileInObjectAndCode:
flushSecurityKey:
Flush a security key
flushSecurityKeys
Flush all keys
generateKeyPairInBackground
SecurityManager default generateKeyPairInBackground
generateLocalKeyPair
SecurityManager default generateLocalKeyPair
hasFileAccess
SecurityManager default hasFileAccess
hasSocketAccess
SecurityManager default hasSocketAccess
initialize
Subclasses should redefine this method to perform initializations on instance creation
isInRestrictedMode
Return true if we're in restricted mode
keysFileName
keysFileName:
loadSecurityKeys
SecurityManager default loadSecurityKeys
positionToSecureContentsOf:
primSecureUserDirectory
primUntrustedUserDirectory
Primitive. Return the untrusted user directory that is the root directory for files that are visible even in restricted mode.
printStateOn:
Print the current state of myself onto stream.
Used to gather information in the debug log.
secureUserDirectory
SecurityManager default secureUserDirectory
shutDown
Flush existing keys
signFile:directory:
Sign the given project in the directory
signingKey
Return the key used for signing projects
startUp
Attempt to load existing keys
storeSecurityKeys
Store the keys file for the current user
trustedKeys
Return an array of trusted public keys for verifying some project
untrustedUserDirectory
SecurityManager default untrustedUserDirectory
SerialPort
This class supports a simple interface to the serial ports of the underlying platform, if it supports serial ports. The mapping of port numbers to hardware ports is platform specific, but typically follows platform ordering conventions. For example, on the Macintosh, port 0 is the modem port and port 1 is the printer port, since in the programmers documentation these ports are referred to as ports A and B.
baudRate
baudRate:
Set the baud rate for this serial port.
close
Close the serial port. Do nothing if the port is not open.
dataBits
dataBits:
Set the number of data bits for this serial port to 5, 6, 7, or 8.
initialize
Default port settings.
inputFlowControlType
inputFlowControlType:
Set the type of input flow control, where:
0 - none
1 - XOn/XOff
2 - hardware handshaking
nextPutAll:
Send the given bytes out this serial port. The port must be open.
openPort:
Open the given serial port, using the settings specified by my instance variables.
outputFlowControlType
outputFlowControlType:
Set the type of output flow control, where:
0 - none
1 - XOn/XOff
2 - hardware handshaking
parityType
parityType:
Set the parity type for this serial port, where:
0 - no parity
1 - odd parity
2 - even parity
primClosePort:
primOpenPort:baudRate:stopBitsType:parityType:dataBits:inFlowControlType:outFlowControlType:xOnByte:xOffByte:
primReadPort:into:startingAt:count:
primWritePort:from:startingAt:count:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
readByteArray
Answer a ByteArray read from this serial port. Answer an empty ByteArray if no data is available. The port must be open.
readInto:startingAt:
Read data into the given String or ByteArray object starting at the given index, and answer the number of bytes read. Does not go past the end of the given String or ByteArray.
readString
Answer a String read from this serial port. Answer the empty String if no data is available. The port must be open.
stopBitsType
stopBitsType:
Set the stop bits type for this serial port, where:
0 - 1.5 stop bits
1 - one stop bit
2 - two stop bits
xOffByte
xOffByte:
Set the value of the XOff byte to be used if XOn/XOff flow control is enabled.
xOnByte
xOnByte:
Set the value of the XOn byte to be used if XOn/XOff flow control is enabled.
SharedPool
A shared pool represents a set of bindings which are accessible to all classes which import the pool in its 'pool dictionaries'. SharedPool is NOT a dictionary but rather a name space. Bindings are represented by 'class variables' - as long as we have no better way to represent them at least.
bindingOf:
bindingsDo:
classBindingOf:
hasBindingThatBeginsWith:
includesKey:
keys
keysDo:
SimpleServiceEntry
I represent a service
provider : the service provider
label : to be display in a menu
selector : to do the service
useLineAfter
stateSelector : a secondary selector (to be able to query state of the provider for example)
description : a description for balloon for example
argumentGetter : a selector to get additional arguments with (if selector requres them)
buttonLabel : a short label
The entire client interface (provided by FileList and other users of the registry)
is this (browse #getArgumentsFrom: and the
senders of #argumentGetter:):
fullName (returns a String with the full filename)
dirAndFileName (returns {directory. fileName})
readOnlyStream (returns an open read-only stream)
addServiceFor:toMenu:
argumentGetter:
buildWith:in:
Answer a button spec that will trigger the receiver service in aModel
buttonLabel
Answer the label to be emblazoned on a button representing the service in a file list, for example
buttonLabel:
Set the receiver's buttonLabel, to be used on a button in a
tool-pane; this is split out so that a more abbreviated wording
can be deployed if desired
buttonToTriggerIn:
Answer a button that will trigger the receiver service in a file list
description
may be used for balloon or other
description:
may be used for balloon or other
extraSelector
normally should not be used directly
extraSelector:
getArgumentsFrom:
label
performExtraFor:
carry out the extra service I provide
performServiceFor:
carry out the service I provide
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
provider
provider:label:selector:
basic initialization message
provider:label:selector:description:
basic initialization message
provider:label:selector:description:buttonLabel:
requestExtraSelector
send me this message to ask me to perform secondary service
selector
normally should not be used directly
useLineAfter
useLineAfter:
SmalltalkImage
I represent the SmalltalkImage and partly the VM. Using my current instance you can
- get the value of some VM parameters, system arguments, vm profiling,
endianess status, external objects,....
- save the image, manage sources
As you will notice browsing my code I'm a fat class having still too much responsibility.
But this is life. sd-2 July 2003
PS: if someone wants to split me go ahead.
aboutThisSystem
Identify software version
assureStartupStampLogged
If there is a startup stamp not yet actually logged to disk, do it now.
calcEndianness
What endian-ness is the current hardware? The String '1234' will be stored into a machine word. On BigEndian machines (the Mac), $1 will be the high byte if the word. On LittleEndian machines (the PC), $4 will be the high byte.
changeImageNameTo:
changesName
Answer the name for the changes file corresponding to the image file name.
closeSourceFiles
Shut down the source files if appropriate. 1/29/96 sw: changed so that the closing and nilification only take place if the entry was a FileStream, thus allowing stringified sources to remain in the saved image file
current
currentChangeSetString
SmalltalkImage current currentChangeSetString
datedVersion
Answer the version of this release.
endianness
event:
Hook for SystemChangeNotifier
exitToDebugger
Primitive. Enter the machine language debugger, if one exists. Essential.
See Object documentation whatIsAPrimitive. This primitive is to access the
debugger when debugging the vm or a plugging in C
extraVMMemory
Answer the current setting of the 'extraVMMemory' VM parameter. See the comment in extraVMMemory: for details.
extraVMMemory:
Request that the given amount of extra memory be reserved for use by the virtual machine to leave extra C heap space available for things like plugins, network and file buffers, and so on. This request is stored when the image is saved and honored when the image is next started up. Answer the previous value of this parameter.
extractParameters
fixObsoleteReferences
SmalltalkImage current fixObsoleteReferences.
SystemNavigation default obsoleteBehaviors size > 0
ifTrue: [ SystemNavigation default obsoleteBehaviors inspect.
self error:'Still have obsolete behaviors. See inspector']
forceChangesToDisk
Ensure that the changes file has been fully written to disk by closing and re-opening it. This makes the system more robust in the face of a power failure or hard-reboot.
forgetModule:
Primitive. If the module named aString is loaded, unloaded. If not, and it is marked an unloadable, unmark it so the VM will try to load it again next time. See comment for #unloadModule:.
fullNameForChangesNamed:
fullNameForImageNamed:
gcBiasToGrow:
Tell the VM to grow after tenures instead of running in a tight loop where it does IGCs over and over. For some weird reason the primitive takes an integer not a bool but oh well...
gcBiasToGrowLimit:
Tell the VM the grow limit if the GC logic has bias to grow.
getFileNameFromUser
getSystemAttribute:
Optional. Answer the string for the system attribute with the given
integer ID. Answer nil if the given attribute is not defined on this
platform. On platforms that support invoking programs from command
lines (e.g., Unix), this mechanism can be used to pass command line
arguments to programs written in Squeak.
By convention, the first command line argument that is not a VM
configuration option is considered a 'document' to be filed in. Such a
document can add methods and classes, can contain a serialized object,
can include code to be executed, or any combination of these.
Currently defined attributes include:
-1000...-1 - command line arguments that specify VM options
0 - the full path name for currently executing VM
(or, on some platforms, just the path name of the VM's directory)
1 - full path name of this image
2 - a Squeak document to open, if any
3...1000 - command line arguments for Squeak programs
1001 - this platform's operating system
1002 - operating system version
1003 - this platform's processor type
1004 - vm version
getVMParameters
Answer an Array containing the current values of the VM's internal
parameter/metric registers. Each value is stored in the array at the
index corresponding to its VM register. (See #vmParameterAt: and
#vmParameterAt:put:.)
hasDisplay
imageName
Answer the full path name for the current image.
imageName:
Set the the full path name for the current image. All further snapshots will use this.
imagePath
Answer the path for the directory containing the image file.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeMemorySettingsProfileQF
Initialize the memory and GC settings to be more in line with QF requirements
initializeMemorySettingsProfileSeaSide
Initialize the memory and GC settings to be more in line with SeaSide requirements
isBigEndian
isLittleEndian
lastQuitLogPosition
lastQuitLogPosition:
should be only use to ensure the transition from SystemDictionary to SmalltalkImage, then be removed
lastUpdateString
SmalltalkImage current lastUpdateString
licenseString
listBuiltinModule:
Return the name of the n-th builtin module.
This list is not sorted!
listBuiltinModules
SmalltalkImage current listBuiltinModules
listLoadedModule:
Return the name of the n-th loaded module.
This list is not sorted!
listLoadedModules
SmalltalkImage current listLoadedModules
logChange:
Write the argument, aString, onto the changes file.
new
openSourceFiles
osVersion
Return the version number string of the platform we're running on
platformName
Return the name of the platform we're running on
platformSubtype
Return the subType of the platform we're running on
primImageName
Answer the full path name for the current image.
primImageName:
Set the the full path name for the current image. All further snapshots will use this.
primVmPath
Answer the path for the directory containing the Smalltalk virtual machine. Return the empty string if this primitive is not implemented.
primitiveGCBiasToGrow:
Tell the VM to grow after tenures instead of running in a tight loop where it does IGCs over and over. For some weird reason the primitive takes an integer not a bool but oh well...
quitPrimitive
Primitive. Exit to another operating system on the host machine, if one
exists. All state changes in the object space since the last snapshot are lost.
Essential. See Object documentation whatIsAPrimitive.
reconstructChanges2
Move all the changes and its histories onto another sources file.
recordStartupStamp
reportCPUandRAM
Write several text files with useful analysis for profiling purposes.
Overwrites any existing report.
SmalltalkImage current reportCPUandRAM
saveAs
Put up the 'saveAs' prompt, obtain a name, and save the image under that new name.
saveAs:
saveAsEmbeddedImage
Save the current state of the system as an embedded image
saveAsNewVersion
Save the image/changes using the next available version number.
saveChangesInFileNamed:
saveImageInFileNamed:
saveImageSegments
saveSession
setPlatformPreferences
Set some platform specific preferences on system startup
shutDown
snapshot:andQuit:
snapshot:andQuit:embedded:
Mark the changes file and close all files as part of #processShutdownList.
If save is true, save the current state of this Smalltalk in the image file.
If quit is true, then exit to the outer OS shell.
The latter part of this method runs when resuming a previously saved image. This resume logic checks for a document file to process when starting up.
snapshotEmbeddedPrimitive
snapshotPrimitive
Primitive. Write the current state of the object memory on a file in the
same format as the Smalltalk-80 release. The file can later be resumed,
returning you to this exact state. Return normally after writing the file.
Essential. See Object documentation whatIsAPrimitive.
sourceFileVersionString
sourceFileVersionString:
sourcesName
Answer the full path to the version-stable source code
startUp
stripMethods:messageCode:
Used to 'cap' methods that need to be protected for proprietary reasons, etc.; call this with a list of triplets of symbols of the form (<class name> <#instance or #class> <selector name>), and with a string to be produced as part of the error msg if any of the methods affected is reached
systemInformationString
textMarkerForShortReport
timeStamp:
Writes system version and current time on stream aStream.
unbindExternalPrimitives
Primitive. Force all external primitives to be looked up again afterwards. Since external primitives that have not found are bound for fast failure this method will force the lookup of all primitives again so that after adding some plugin the primitives may be found.
unloadModule:
Primitive. Unload the given module.
This primitive is intended for development only since some
platform do not implement unloading of DLL's accordingly.
Also, the mechanism for unloading may not be supported
on all platforms.
vmParameterAt:
parameterIndex is a positive integer corresponding to one of the VM's internal
parameter/metric registers. Answer with the current value of that register.
Fail if parameterIndex has no corresponding register.
VM parameters are numbered as follows:
1 end of old-space (0-based, read-only)
2 end of young-space (read-only)
3 end of memory (read-only)
4 allocationCount (read-only)
5 allocations between GCs (read-write)
6 survivor count tenuring threshold (read-write)
7 full GCs since startup (read-only)
8 total milliseconds in full GCs since startup (read-only)
9 incremental GCs since startup (read-only)
10 total milliseconds in incremental GCs since startup (read-only)
11 tenures of surving objects since startup (read-only)
12-20 specific to the translating VM
21 root table size (read-only)
22 root table overflows since startup (read-only)
23 bytes of extra memory to reserve for VM buffers, plugins, etc.
24 memory threshold above which shrinking object memory (rw)
25 memory headroom when growing object memory (rw)
26 interruptChecksEveryNms - force an ioProcessEvents every N milliseconds, in case the image is not calling getNextEvent often (rw)
27 number of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking
28 number of times sweep loop iterated for current IGC/FGC (read-only)
29 number of times make forward loop iterated for current IGC/FGC (read-only)
30 number of times compact move loop iterated for current IGC/FGC (read-only)
31 number of grow memory requests (read-only)
32 number of shrink memory requests (read-only)
33 number of root table entries used for current IGC/FGC (read-only)
34 number of allocations done before current IGC/FGC (read-only)
35 number of survivor objects after current IGC/FGC (read-only)
36 millisecond clock when current IGC/FGC completed (read-only)
37 number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only)
38 milliseconds taken by current IGC (read-only)
39 Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only)
40 VM word size - 4 or 8 (read-only)
vmParameterAt:put:
parameterIndex is a positive integer corresponding to one of the VM's internal
parameter/metric registers. Store newValue (a positive integer) into that
register and answer with the previous value that was stored there.
Fail if newValue is out of range, if parameterIndex has no corresponding
register, or if the corresponding register is read-only.
vmPath
Answer the path for the directory containing the Smalltalk virtual machine. Return the empty string if this primitive is not implemented.
vmStatisticsReportString
StringHolderView open: (StringHolder new contents:
SmalltalkImage current vmStatisticsReportString) label: 'VM Statistics'
vmStatisticsShortString
Convenience item for access to recent statistics only
vmVersion
Return a string identifying the interpreter version
SmartRefStream
Ordinary ReferenceStreams assume that the names and order of instance variables is exactly the same when an object file is written and read.
SmartRefStream allows object files to be read even after instance variables have changed or the entire class has been renamed.
When an object file is written, no one knows how the classes will change in the future. Therefore, all conversion must be done when the file is read. The key is to store enough information in the file about the names of the instance variables of all outgoing classes.
SmartRefStream works best with only one tree of objects per file. You can nextPut: more than once, but each object tree gets its own class structure description, which is big.
Conversion of old objects is done by a method in each class called (convertToCurrentVersion: varDict refStream: smartRefStrm). At fileOut time, ChangeSet>>checkForConversionMethods creates a prototype of this method (if Preference #conversionMethodsAtFileOut is true). The programmer must edit this method to (1) test if the incoming object needs conversion, (2) put non-nil values into any new inst vars that need them, and (3) save the data of any inst vars that are being deleted.
Determining which old version is represented by the incoming object can be done in several ways: noticing that a current inst var is nil when it should have data, noticing that there is an older inst var name in the variable dictionary (varDict), checking kinds of objects in one or more inst vars, or retrieving the classVersion of the incoming object from the ref stream.
If a class is renamed, a method goes into SmartRefStream telling the new name. The conversion method of the new class must be prepared to accept instances of the old class also. If no inst var names have changed, the conversion method does nothing.
An example:
Suppose we change the representation of class Rectangle from ('origin' 'corner') to ('origin' 'extent'). Suppose lots of Rectangle instances are already out on files (in .pr project files, especially).
The programmer changes the class definition, modifies all the methods, and filesOut. A series of dialogs appear, asking if instances Rectangle might be in an object file, if 'extent' needs to be non-nil (yes), and if the info in 'corner' needs to be preserved (yes). This method appears:
Rectangle >> convertToCurrentVersion: varDict refStream: smartRefStrm
"These variables are automatically stored into the new instance: #('origin').
Test for this particular conversion. Get values using expressions like (varDict at: 'foo')."
"New variables: #('extent'). If a non-nil value is needed, please assign it."
"These are going away #('corner'). Possibly store their info in some other variable?"
"Move your code above the ^ super... Delete extra comments."
^ super convertToCurrentVersion: varDict refStream: smartRefStrm
The programmer modifies it to be:
Rectangle >> convertToCurrentVersion: varDict refStream: smartRefStrm
(varDict includesKey: 'extent') ifFalse: ["old version!"
"Create the new extent, and preserve the info from the old corner"
extent _ (varDict at: 'corner') - origin.
].
^ super convertToCurrentVersion: varDict refStream: smartRefStrm
This conversion method stays in the system and is ready to convert the old format of Rectangle whenever one is encountered in an object file. Note that the subclasses of Rectangle, (B3DViewport, CharacterBlock, and Quadrangle) do not need conversion methods. Their instances will be converted by the code in Rectangle.
Files written by SmartRefStream are in standard fileout format. You can mix raw objects with code to be filed in. The file starts out in the normal fileOut format. Definitions of new classes on the front.
structures Dictionary of (#Rectangle -> #(<classVersionInteger> 'origin' 'corner')). Inst
var names are strings.
steady Set of Classes who have the same structure now as on the incoming file.
Includes classes with same inst vars except for new ones added on the end.
reshaped Dictionary of Classes who have a different structure now from the incoming file.
Includes those with same inst vars but new version number.
(old class name -> method selector to fill in data for version to version)
renamed Dictionary of Classes who have a different name. Make an instance of the new
class, and send it the conversion call.
(old class name symbol -> new class name).
renamedConv Dictionary of conversion selector for Classes who have a different name.
(old class name symbol -> conversion selector).
topCall Tells if next or nextPut: are working on the top object in the tree.
nil if outside, the top object if deep inside.
See DataStream.typeIDFor: for where the tangle of objects is clipped, so the whole system will not be written on the file.
No object that is written on the file is ever a class. All class definitions are filed in. A class may be stored inside an ImageSegment that itself is stored in a SmartRefStream.
UniClasses are classes for the instance specific behavior of just one instance. Subclasses of Player are an example. When a UniClass is read in, and a class of the same name already exists, the incoming one is renamed. ObjectScanner converts the filed-in code.
Values in instance variables of UniClasses are stored in the array that tells the class structure. It is the fourth of the four top level objects. #(version (class-structure) the-object ((#Player25 scripts slotInfo costumeDictionary) (#Player26 scripts slotInfo costumeDictionary))).
There is a separate subclass for doing veryDeepCopy (in memory). Currently, any object for which objectToStoreOnDataStream return an object other than self, does this: The new object (a DiskProxy) is traced. When it comes time to go through the fields of the old object, they are not found as keys in references (DiskProxies are there instead). So the old field value is left in the new object. That is OK for StrikeFont, Class, MetaClass, DisplayScreen. But the DiskProxies are evaluated, which takes a lot of time.
Some metaclasses are put into the structures table. This is for when a block has a receiver that is a class. See checkFatalReshape:.
ImageSegments:
A ReferenceStream is used to enumerate objects to put inside an ImageSegment. If an instance of a UniClass is seen, the class is put in also.
A SmartRefStream is used to store the ImageSegment. Roots are nil, and the segment is a wordArray. We are encoding the outPointers. Structures contains all classes from both places. Must filter out UniClasses for some things, and do include them for putting source code at end of file. Do not write any class inst vars in file.
--Ted Kaehler and Bob Arning.
abstractStringx0
appendClassDefns
Make this a fileOut format file. For each UniClass mentioned, prepend its source code to the file. Class name conflicts during reading will be resolved then. Assume instVarInfo: has already been done.
applyConversionMethodsTo:className:varMap:
Modify the object's instance vars to have the proper values
for its new shape. Mostly, fill in defaut values of new inst vars.
Can substitute an object of a different class. (Beware: if
substituted, varMap will not be correct when the new object is asked
to convert.)
catalogValues:size:
Create a dictionary of (name -> value) for the inst vars of this reshaped object. Indexed vars as (1 -> val) etc.
checkCrLf
Watch for a file that has had all of its Cr's converted to CrLf's. Some unpacking programs like Stuffit 5.0 do this by default!
checkFatalReshape:
Inform the user if any of these classes were reshaped. A block has a method from the old system whose receiver is of this class. The method's inst var references might be wrong. OK if inst vars were only added.
cleanUpCategories
clippingMorphbosfcep0
conversionMethodsFor:
Each of these needs a conversion method. Hard part is the comment in it. Return a MessageSet.
convert1:to:allVarMaps:
Go through the normal instance conversion process and return a modern object.
convert2:allVarMaps:
Go through the normal instance conversion process and return a modern object.
dropShadowMorphbosfces0
initKnownRenames
initShapeDicts
Initialize me.
instVarInfo:
Return the object to write on the outgoing file that contains the structure of each class we are about to write out. Must be an Array whose first element is 'class structure'. Its second element is a Dictionary of pairs of the form #Rectangle -> #(<classVersion> 'origin' 'corner').
layoutMorphbosfcepbbochvimol0
layoutMorphbosfcepcbbochvimol0
mapClass:
See if the old class named nm exists. If so, return it. If not, map it to a new class, and save the mapping in renamed.
mapClass:origName:
See if instances changed shape. If so, make a fake class for the old shape and return it. Remember the original class name.
moreObjects
Return true if there appears to be another object following this one on the file.
morphicEventtcbks0
morphicSoundEventtcbkss0
multiStringx0
multiSymbolx0
myMorphbosfce0
newMorphicEventts0
next
Really write three objects: (version, class structure, object). But only when called from the outside.
nextAndClose
Speedy way to grab one object. Only use when we are inside an object binary file. If used for the start of a SmartRefStream mixed code-and-object file, tell the user and then do the right thing.
nextPut:
Really write three objects: (version, class structure, object). But only when called from the outside. If any instance-specific classes are present, prepend their source code. byteStream will be in fileOut format.
You can see an analysis of which objects are written out by doing:
(SmartRefStream statsOfSubObjects: anObject)
(SmartRefStream tallyOfSubObjects: anObject)
(SmartRefStream subObjects: anObject ofClass: aClass)
nextPutObjOnly:
Really write three objects: (version, class structure, object). But only when called from the outside. Not in fileOut format. No class definitions will be written for instance-specific classes. Error if find one. (Use nextPut: instead)
noHeader
Signal that we've already dealt with the version and structure array, and are now reading objects.
objectFromStreamedRepresentation:
read:withClasses:
readInstance
Read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Three cases for files from older versions of the system:
1) Class has not changed shape, read it straight.
2) Class has changed instance variables (or needs fixup). Call a particular method to do it.
3) There is a new class instead. Find it, call a particular method to read.
All classes used to construct the structures dictionary *itself* need to be in 'steady' and they must not change! See setStream:
readInstanceSize:clsname:refPosn:
The common code to read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Three cases for files from older versions of the system:
1) Class has not changed shape, read it straight.
2) Class has changed instance variables (or needs fixup). Call a particular method to do it.
3) There is a new class instead. Find it, call a particular method to read.
All classes used to construct the structures dictionary *itself* need to be in 'steady' and they must not change! See setStream:
readShortInst
Instance has just one byte of size. Class symbol is encoded in two bytes of file position. See readInstance.
readWordLike
Can be used by any class that is bits and not bytes (WordArray, Bitmap, SoundBuffer, etc).
recordImageSegment:
Besides the objects being written out, record the structure of instances inside the image segment we are writing out.
renamed
renamedConv
reshapedClassesIn:
Look for classes in the outPointer array that have changed shape. Make a fake class for the old shape. Return a dictionary mapping Fake classes to Real classes. Substitute fake classes for real ones in outPointers.
saveClassInstVars
Install the values of the instance variables of UniClasses.
classInstVars is an array of arrays (#Player3 (Player3 class's inst var
scripts) (Player3 class's inst var slotInfo) ...)
scanFrom:
During a code fileIn, we need to read in an object, and stash it in ScannedObject.
scannedObject
scannedObject:
setStream:
Initialize me.
setStream:reading:
Initialize me.
statsOfSubObjects:
storeInstVarsIn:from:
For instance variables with the same names, store them in the new instance. Values in variable-length part also. This is NOT the normal inst var transfer! See Object.readDataFrom:size:. This is for when inst var names have changed and some additional conversion is needed. Here we handle the unchanged vars.
streamedRepresentationOf:
structures
structures:
subObjects:ofClass:
superclasses
superclasses:
tallyOfSubObjects:
transparentColorrcc0
uniClasesDo:
Examine structures and execute the block with each instance-specific class
uniClassInstVarsRefs:
If some of the objects seen so far are instances UniClasses, check the UniClasses for extra class inst vars, and send them to the steam also. The new objects get added to (dummy references), where they will be noticed by the caller. They will wind up in the structures array and will be written on the disk by class.
Return all classes seen.
verifyStructure
Compare the incoming inst var name lists with the existing classes. Prepare tables that will help to restructure those who need it (renamed, reshaped, steady). If all superclasses are recorded in the file, only compare inst vars of this class, not of superclasses. They will get their turn.
versionSymbol:
Create the symbolic code (like a version number) for this class in some older version. First initials of all the inst vars, followed by the class version number. Returns a string, caller makes it into a compound selector.
worldMorphbosfcebbfgccpmcpbttloiairfidcuwhavcdsll0
writeClassRename:was:
Write a method that tells which modern class to map instances to.
writeClassRenameMethod:was:fromInstVars:
The class coming is unknown. Ask the user for the existing class it maps to. If got one, write a method, and restart the obj fileIn. If none, write a dummy method and get the user to complete it later.
writeConversionMethod:class:was:fromInstVars:to:
The method convertToCurrentVersion:refStream: was not found in newClass. Write a default conversion method for the author to modify.
writeConversionMethodIn:fromInstVars:to:renamedFrom:
The method convertToCurrentVersion:refStream: was not found in newClass. Write a default conversion method for the author to modify. If method exists, append new info into the end.
SoundService
This is the AppRegistry class for the sound system.
A sound system offers a small protocol for playing sounds and making beeps and works like a facade towards the rest of Squeak. A sound system is registered in this registry and can be accessed by "SoundService default". This way we decouple the sound system from the rest of Squeak and make it pluggable. It also is a perfect spot to check for the Preference class>>soundsEnabled.
SpaceTally
I'm responsible to help getting information about system space usage. The information I compute is represented by a spaceTallyItem
try something like:
((SpaceTally new spaceTally: (Array with: TextMorph with: Point))
asSortedCollection: [:a :b | a spaceForInstances > b spaceForInstances])
SpaceTally new systemWideSpaceTally
This class has been created from a part of SystemDictionary. It still deserves a nice
clean, such as using object instead of array having 4 slots.
sd-20 June 2003
compareTallyIn:to:
SpaceTally new compareTallyIn: 'tally' to: 'tally2'
computeSpaceUsage
preAllocateResultsFor:
printSpaceAnalysis
SpaceTally new printSpaceAnalysis
printSpaceAnalysis:on:
SpaceTally new printSpaceAnalysis: 1 on:(FileStream forceNewFileNamed: 'STspace.text')
printSpaceDifferenceFrom:to:
For differential results, run printSpaceAnalysis twice with different fileNames,
then run this method...
SpaceTally new printSpaceAnalysis: 0 on: 'STspace.text1'.
--- do something that uses space here ---
SpaceTally new printSpaceAnalysis: 0 on: 'STspace.text2'.
SpaceTally new printSpaceDifferenceFrom: 'STspace.text1' to: 'STspace.text2'
results
saveTo:
| st |
st := SpaceTally new.
st spaceTally: (Array with: TextMorph with: Point).
st saveTo: 'spaceTally2'
spaceForInstancesOf:withInstanceCount:
Answer the number of bytes consumed by all instances of the given class, including their object headers.
spaceTally:
Answer a collection of SpaceTallyItems representing the memory space (in bytes) consumed by the code and instances of each class in the system. Note that code sizes do not currently report memory consumed by class variables.
systemWideSpaceTally
Answer a collection of SpaceTallyItems representing the memory space (in bytes) consumed by the code and instances of each class in the system. Note that code sizes do not currently report memory consumed by class variables.
SpaceTallyItem
I'm represent an entry in the spaceTally.
analyzedClassName
analyzedClassName:
analyzedClassName:codeSize:instanceCount:spaceForInstances:
codeSize
codeSize:
instanceCount
instanceCount:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
spaceForInstances
spaceForInstances:
SqueakClipboard
A SqueakClipboard is the legacy clipboard using VM supplied primitives.
SystemChangeNotifier
A SystemChangeNotifier is xxxxxxxxx.
Instance Variables
eventSource: <Object>
silenceLevel: <Object>
eventSource
- xxxxx
silenceLevel
- xxxxx
allSystemEvents
categoryKind
class:oldComment:newComment:oldStamp:newStamp:
A class was commented in the system.
class:recategorizedFrom:to:
classAdded:inCategory:
classCategoryAdded:
classCategoryRemoved:
classCategoryRenamedFrom:to:
classCommented:
A class with the given name was commented in the system.
classCommented:inCategory:
A class with the given name was commented in the system.
classDefinitionChangedFrom:to:
classKind
classRemoved:fromCategory:
classRenamed:from:to:inCategory:
classReorganized:
createInstance
doSilently:
Perform the block, and ensure that no system notification are broadcasted while doing so.
evaluated:
evaluated:context:
expressionKind
hasNotificationsFor:
Do we send system notifications to anObject?
initialize
Subclasses should redefine this method to perform initializations on instance creation
instanceCreationErrorString
isBroadcasting
methodAdded:selector:inClass:
A method with the given selector was added to aClass, but not put in a protocol.
methodAdded:selector:inClass:requestor:
A method with the given selector was added to aClass, but not put in a protocol.
methodAdded:selector:inProtocol:class:
A method with the given selector was added to aClass in protocol aCategoryName.
methodAdded:selector:inProtocol:class:requestor:
A method with the given selector was added to aClass in protocol aCategoryName.
methodChangedFrom:to:selector:inClass:
methodChangedFrom:to:selector:inClass:oldProtocol:newProtocol:requestor:
methodChangedFrom:to:selector:inClass:requestor:
methodKind
methodRemoved:selector:class:
A method with the given selector was removed from the class.
methodRemoved:selector:inProtocol:class:
A method with the given selector was removed from the class.
new
noMoreNotificationsFor:
Stop sending system notifications to an object.
notify:ofAllSystemChangesUsing:
Notifies an object of any system changes.
notify:ofEvents:using:
Notifies an object of any events in the eventsCollection. Send it back a message #oneArgumentSelector, with as argument the particular system event instance.
notify:ofSystemChangesOfChange:using:
Notifies an object of system changes of the specified changeKind (#added, #removed, ...). Evaluate 'AbstractEvent allChangeKinds' to get the complete list.
notify:ofSystemChangesOfItem:change:using:
Notifies an object of system changes of the specified itemKind (#class, #category, ...) and changeKind (#added, #removed, ...). This is the finest granularity possible.
Evaluate 'AbstractEvent allChangeKinds' to get the complete list of change kinds, and 'AbstractEvent allItemKinds to get all the possible item kinds supported.
notify:ofSystemChangesOfItem:using:
Notifies an object of system changes of the specified itemKind (#class, #method, #protocol, ...). Evaluate 'AbstractEvent allItemKinds' to get the complete list.
protocolKind
releaseAll
Release all the dependents so that nobody receives notifications anymore.
resetUniqueInstance
selector:recategorizedFrom:to:inClass:
setBroadcasting
systemEventsForChange:
systemEventsForItem:
systemEventsForItem:change:
traitDefinitionChangedFrom:to:
trigger:
uniqueInstance
SystemDictionary
I represent a special dictionary that supports protocol for asking questions about the structure of the system. Other than class names, I contain (print this)...
Smalltalk keys select: [:k | ((Smalltalk at: k) isKindOf: Class) not]
thenCollect: [:k | k -> (Smalltalk at: k) class]
abandonSources
Smalltalk abandonSources
abandonTempNames
Replaces every method by a copy with no source pointer or
encoded temp names.
add:toList:after:
Add the name of aClass to the startUp or shutDown list.
Add it after the name of predecessor, or at the end if predecessor is nil.
addToShutDownList:
This will add a ref to this class at the BEGINNING of the shutDown list.
addToShutDownList:after:
addToStartUpList:
This will add a ref to this class at the END of the startUp list.
addToStartUpList:after:
allClasses
Return all the class defines in the Smalltalk SystemDictionary
allClassesAndTraits
Return all the classes and traits defined in the Smalltalk SystemDictionary
allClassesAndTraitsDo:
allClassesDo:
Evaluate the argument, aBlock, for each class in the system.
allTraits
Return all traits defined in the Smalltalk SystemDictionary
associationOrUndeclaredAt:
return an association or install in undeclared. Used for mating up ImageSegments.
at:put:
Override from Dictionary to check Undeclared and fix up
references to undeclared variables.
bytesLeft
Answer the number of bytes of space available. Does a full garbage collection.
bytesLeft:
Return the amount of available space. If aBool is true, include possibly available swap space. If aBool is false, include possibly available physical memory. For a report on the largest free block currently availabe within Squeak memory but not counting extra memory use #primBytesLeft.
bytesLeftString
Return a string describing the amount of memory available
classNamed:
classNames
Answer a SortedCollection of all class names.
classOrTraitNamed:
aString is either a class or trait name or a class or trait name followed by ' class' or 'classTrait' respectively.
Answer the class or metaclass it names.
cleanOutUndeclared
cleanUpUndoCommands
Smalltalk cleanUpUndoCommands
clearExternalObjects
Clear the array of objects that have been registered for use in non-Smalltalk code.
compactClassesArray
Smalltalk compactClassesArray
compressSources
Copy all the source file to a compressed file. Usually preceded by Smalltalk condenseSources.
computeImageSegmentation
Smalltalk computeImageSegmentation
condenseChanges
Move all the changes onto a compacted sources file.
condenseSources
Move all the changes onto a compacted sources file.
createStackOverflow
For testing the low space handler...
currentChangeSetString
Smalltalk currentChangeSetString
currentProjectDo:
So that code can work after removal of Projects
discardDiscards
Discard all discard* methods - including this one.
discardFFI
Discard the complete foreign function interface.
NOTE: Recreates specialObjectsArray to prevent obsolete
references. Has to specially remove external structure
hierarchy before ExternalType
discardFlash
Discard Flash support.
discardMIDI
this seems to have gone away
discardNetworking
Discard the support for TCP/IP networking.
discardOddsAndEnds
This method throws out lots of classes that are not frequently
used.
discardSUnit
Smalltalk discardSUnit
discardSoundSynthesis
Discard the sound synthesis facilities, and the methods and
classes that use it. This also discards MIDI.
discardTrueType
Discard TrueType support.
exitToDebugger
Primitive. Enter the machine language debugger, if one exists. Essential.
See Object documentation whatIsAPrimitive.
externalObjects
Return an array of objects that have been registered for use in non-Smalltalk code. Smalltalk objects should be referrenced by external code only via indirection through this array, thus allowing the objects to move during compaction. This array can be cleared when the VM re-starts, since variables in external code do not survive snapshots. Note that external code should not attempt to access a Smalltalk object, even via this mechanism, while garbage collection is in progress.
externalizeSources
Write the sources and changes streams onto external files.
flushClassNameCache
Smalltalk flushClassNameCache
forceChangesToDisk
Ensure that the changes file has been fully written to disk by closing and re-opening it. This makes the system more robust in the face of a power failure or hard-reboot.
forceTenure
Primitive. Tell the GC logic to force a tenure on the next increment GC.
forgetClass:logged:
Delete the class, aClass, from the system.
Note that this doesn't do everything required to dispose of a class - to do that use Class>>removeFromSystem.
forgetDoIts
Smalltalk forgetDoIts
garbageCollect
Primitive. Reclaims all garbage and answers the number of bytes of available space.
garbageCollectMost
Primitive. Reclaims recently created garbage (which is usually most of it) fairly quickly and answers the number of bytes of available space.
handleUserInterrupt
hasClassNamed:
Answer whether there is a class of the given name, but don't intern aString if it's not alrady interned. 4/29/96 sw
hasMorphic
Answer whether the Morphic classes are available in the
system (they may have been stripped, such as by a call to
Smalltalk removeMorphic
hasSpecialSelector:ifTrueSetByte:
initialize
Subclasses should redefine this method to perform initializations on instance creation
inspectGlobals
Smalltalk inspectGlobals
installLowSpaceWatcher
Start a process to watch for low-space conditions.
internalizeChangeLog
Smalltalk internalizeChangeLog
internalizeSources
Smalltalk internalizeSources
isMorphic
Answer true if the user interface is running in Morphic rathern than
MVC. By convention the gloabl variable World is set to nil when MVC is
running. ScheduledControllers could be set to nil when Morphic is
running, but this symmetry is not yet in effect.
isRoot:
Primitive. Answer whether the object is currently a root for youngSpace.
isSelfEvaluating
isYoung:
Primitive. Answer whether the object currently resides in youngSpace.
lastRemoval
Smalltalk lastRemoval
logError:inContext:to:
Log the error message and a stack trace to the given file.
lowSpaceThreshold
Return the low space threshold. When the amount of free memory (after garbage collection) falls below this limit, the system is in serious danger of completely exhausting memory and crashing. This limit should be made high enough to allow the user open a debugger to diagnose a problem or to save the image.
lowSpaceWatcher
Wait until the low space semaphore is signalled, then take appropriate
actions.
lowSpaceWatcherProcess
m17nVersion
majorShrink
Undertake a major shrinkage of the image.
This method throws out lots of the system that is not needed
for, eg, operation in a hand-held PC. majorShrink produces a
999k image in Squeak 2.8
Smalltalk majorShrink; abandonSources; lastRemoval
makeExternalRelease
Smalltalk makeExternalRelease
makeInternalRelease
Smalltalk makeInternalRelease
memoryHogs
Answer the list of objects to notify with #freeSomeSpace if memory gets full.
nihongoVersion
objectForDataStream:
I am about to be written on an object file. Write a reference to Smalltalk instead.
okayToProceedEvenIfSpaceIsLow
Return true if either there is enough memory to do so safely or if the user gives permission after being given fair warning.
organization
Return the organizer for the receiver
poolUsers
Answer a dictionary of pool name -> classes that refer to it.
Also includes any globally know dictionaries (such as
Smalltalk, Undeclared etc) which although not strictly
accurate is potentially useful information
presumedSentMessages
Smalltalk presumedSentMessages
primBytesLeft
Primitive. Answer the number of bytes available for new object data.
Not accurate unless preceded by
Smalltalk garbageCollectMost (for reasonable accuracy), or
Smalltalk garbageCollect (for real accuracy).
See Object documentation whatIsAPrimitive.
primImageName
Answer the full path name for the current image.
primImageName:
Set the the full path name for the current image. All further snapshots will use this.
primLowSpaceSemaphore:
Primitive. Register the given Semaphore to be signalled when the
number of free bytes drops below some threshold. Disable low-space
interrupts if the argument is nil.
primSignalAtBytesLeft:
Tell the interpreter the low-space threshold in bytes. When the free
space falls below this threshold, the interpreter will signal the low-space
semaphore, if one has been registered. Disable low-space interrupts if the
argument is zero. Fail if numBytes is not an Integer.
primVmPath
Answer the path for the directory containing the Smalltalk virtual machine. Return the empty string if this primitive is not implemented.
primitiveGarbageCollect
Primitive. Reclaims all garbage and answers the number of bytes of available space.
printElementsOn:
The original code used #skip:, but some streams do not support that,
and we don't really need it.
printOn:
Append a sequence of characters that identify the receiver to aStream.
processShutDownList:
Send #shutDown to each class that needs to wrap up before a snapshot.
processStartUpList:
Send #startUp to each class that needs to run initialization after a snapshot.
quitPrimitive
Primitive. Exit to another operating system on the host machine, if one
exists. All state changes in the object space since the last snapshot are lost.
Essential. See Object documentation whatIsAPrimitive.
reclaimDependents
No-opped due to weak dictionary in use
reconstructChanges
Move all the changes and its histories onto another sources file.
recover:
Schedule an editable text view on the last n characters of changes.
recreateSpecialObjectsArray
Smalltalk recreateSpecialObjectsArray
registerExternalObject:
Register the given object in the external objects array and return its index. If it is already there, just return its index.
removeAllLineFeeds
Smalltalk removeAllLineFeeds
removeAllLineFeedsQuietly
Smalltalk removeAllLineFeedsQuietly
removeAllLineFeedsQuietlyCalling:
Smalltalk removeAllLineFeedsQuietly
removeAllUnSentMessages
removeAllUnsentMessages
Smalltalk removeAllUnsentMessages
removeClassNamed:
Invoked from fileouts: if there is currently a class in the system named aName, then remove it. If anything untoward happens, report it in the Transcript.
removeEmptyMessageCategories
Smalltalk removeEmptyMessageCategories
removeFromShutDownList:
removeFromStartUpList:
removeNormalCruft
Remove various graphics, uniclasses, references. Caution: see
comment at bottom of method
removeSelector:
Safely remove a selector from a class (or metaclass). If the
class or the method doesn't exist anymore, never mind and
answer nil.
This method should be used instead of 'Class removeSelector:
#method' to omit global class references.
renameClass:as:
Rename the class, aClass, to have the title newName.
renameClass:from:
Rename the class, aClass, to have the title newName.
renameClassNamed:as:
Invoked from fileouts: if there is currently a class in the system named oldName, then rename it to newName. If anything untoward happens, report it in the Transcript.
reportClassAndMethodRemovalsFor:
Smalltalk reportClassAndMethodRemovalsFor: #(Celeste Scamper MailMessage)
rootTable
Primitive. Answer a snapshot of the VMs root table.
Keep in mind that the primitive may itself cause GC.
rootTableAt:
Primitive. Answer the nth element of the VMs root table
scopeFor:from:envtAndPathIfFound:
Null compatibility with partitioning into environments.
send:toClassesNamedIn:with:
Send the message #startUp: or #shutDown: to each class named in the list.
The argument indicates if the system is about to quit (for #shutDown:) or if
the image is resuming (for #startUp:).
If any name cannot be found, then remove it from the list.
setGCBiasToGrow:
Primitive. Indicate that the GC logic should be bias to grow
setGCBiasToGrowGCLimit:
Primitive. Indicate that the bias to grow logic should do a GC after aNumber Bytes
setGCParameters
Adjust the VM's default GC parameters to avoid premature tenuring.
setGCSemaphore:
Primitive. Indicate the GC semaphore index to be signaled on GC occurance.
setMacFileInfoOn:
On Mac, set the file type and creator (noop on other platforms)
shutDown
shutDownSound
No longer used in the release, but retained for backward compatibility.
signalLowSpace
Signal the low-space semaphore to alert the user that space is running low.
snapshotEmbeddedPrimitive
snapshotPrimitive
Primitive. Write the current state of the object memory on a file in the
same format as the Smalltalk-80 release. The file can later be resumed,
returning you to this exact state. Return normally after writing the file.
Essential. See Object documentation whatIsAPrimitive.
specialNargsAt:
Answer the number of arguments for the special selector at: anInteger.
specialObjectsArray
Smalltalk specialObjectsArray at: 1
specialSelectorAt:
Answer the special message selector from the interleaved specialSelectors array.
specialSelectorSize
Answer the number of special selectors in the system.
specialSelectors
Used by SystemTracer only.
storeDataOn:
I don't get stored. Use a DiskProxy
testFormatter
Smalltalk testFormatter
testFormatter2
Smalltalk testFormatter2
traitNames
Answer a SortedCollection of all traits (not including class-traits) names.
unbindExternalPrimitives
Primitive. Force all external primitives to be looked up again afterwards. Since external primitives that have not found are bound for fast failure this method will force the lookup of all primitives again so that after adding some plugin the primitives may be found.
unregisterExternalObject:
Unregister the given object in the external objects array. Do nothing if it isn't registered.
unusedClasses
Enumerates all classes in the system and returns a list of those that are
apparently unused. A class is considered in use if it (a) has subclasses
or (b) is referred to by some method or (c) has its name in use as a
literal.
unusedClassesAndMethodsWithout:
Accepts and returns a pair: {set of class names. set of selectors}.
It is expected these results will be diff'd with the normally unused
results.
useUpMemory
For testing the low space handler...
useUpMemoryWithArrays
For testing the low space handler...
useUpMemoryWithContexts
For testing the low space handler...
useUpMemoryWithTinyObjects
For testing the low space handler...
verifyChanges
Smalltalk verifyChanges
verifyMorphicAvailability
If Morphic is available, return true; if not, put up an informer and return false
version
Answer the version of this release.
veryDeepCopyWith:
Return self. I can't be copied. Do not record me.
wordSize
Answer the size (in bytes) of an object pointer.
writeImageSegmentsFrom:withKernel:
segmentDictionary is associates segmentName -> {classNames. methodNames},
and kernel is another set of classNames determined to be essential.
Add a partition, 'Secondary' with everything not in partitions and not in the kernel.
Then write segments based on this partitioning of classes.
writeRecentCharacters:toFileNamed:
Schedule an editable text view on the last n characters of changes.
writeRecentToFile
Smalltalk writeRecentToFile
zapAllOtherProjects
Smalltalk zapAllOtherProjects
SystemEventManager
A SystemEventManager is EventManager that overrides Object>>actionSequenceForEvent: anEventSelector to supply WeakActionSequenceTrappingErrors as the default event.
actionSequenceForEvent:
SystemNavigation
I support the navigation of the system. I act as a facade but as I could require some state
or different way of navigating the system all my behavior are on the instance side
addSelectorsReferingTo:in:to:special:byte:
allBehaviorsDo:
Evaluate the argument, aBlock, for each kind of Behavior in the system
(that is, Object and its subclasses and Traits).
ar 7/15/1999: The code below will not enumerate any obsolete or anonymous
behaviors for which the following should be executed:
Smalltalk allObjectsDo:[:obj| obj isBehavior ifTrue:[aBlock value: obj]].
but what follows is way faster than enumerating all objects.
allCallsOn:
Answer a Collection of all the methods that call on aLiteral even deeply embedded in
literal array.
allCallsOn:and:
Answer a SortedCollection of all the methods that call on both aLiteral
and secondLiteral.
allCallsOn:from:
Answer a SortedCollection of all the methods that call on aSymbol.
allClasses
currently returns all the classes defined in Smalltalk but could be customized
for dealing with environments and in such a case would return on really all the classes
allClassesAndTraits
allClassesDo:
currently returns all the classes defined in Smalltalk but could be customized
for dealing with environments and in such a case would work on really all the classes
allClassesImplementing:
Answer an Array of all classes that implement the message aSelector.
allClassesInPackageNamed:
allClassesWithUnimplementedCalls
Answer an Array of classes that have messages with calls to methods that aren't implemented
anywhere in the system
allContributors
SystemNavigation default allContributors
allGlobalRefs
Answer a set of symbols that may be refs to Global names. In some sense we should only need the associations, but this will also catch, eg, HTML tag types.
allGlobalRefsWithout:
Answer a set of symbols that may be refs to Global names. In some
sense we should only need the associations, but this will also catch, eg,
HTML tag types. This method computes its result in the absence of
specified classes and messages.
allImplementedMessages
Answer a Set of all the messages that are implemented in the system.
allImplementedMessagesWithout:
Answer a Set of all the messages that are implemented in the system,
computed in the absence of the supplied classes and messages. Note this
reports messages that are in the absent selectors set.
allImplementorsOf:
Answer a SortedCollection of all the methods that implement the message
aSelector.
allImplementorsOf:localTo:
Answer a SortedCollection of all the methods that implement the message
aSelector in, above, or below the given class.
allMethodsInCategory:
allMethodsNoDoitsSelect:
Like allSelect:, but strip out Doits
allMethodsSelect:
Answer a SortedCollection of each method that, when used as the block
argument to aBlock, gives a true result.
allMethodsWithSourceString:matchCase:
Answer a SortedCollection of all the methods that contain, in source code, aString as a substring. Search the class comments also
allObjectsDo:
Evaluate the argument, aBlock, for each object in the system
excluding SmallIntegers.
allObjectsSelect:
Evaluate the argument, aBlock, for each object in the system excluding
SmallIntegers. Return a collection af all objects for whom the value is
true.
allPrimitiveMethods
Answer an OrderedCollection of all the methods that are implemented by primitives.
allPrimitiveMethodsInCategories:
Answer an OrderedCollection of all the methods that are implemented by
primitives in the given categories. 1/26/96 sw
allReferencesToPool:from:
Answer all the references to variables from aPool
allSelect:
Answer a SortedCollection of each method that, when used as
the block
argument to aBlock, gives a true result.
allSelectorsWithAnyImplementorsIn:
Answer the subset of the given list which represent method selectors
which have at least one implementor in the system.
allSendersOf:
allSendersOf:inClass:
allSendersOf:inClassCategory:
allSendersOf:inPackageNamed:
allSentMessages
Answer the set of selectors which are sent somewhere in the system.
allSentMessagesWithout:
Answer the set of selectors which are sent somewhere in the system,
computed in the absence of the supplied classes and messages.
allSortedClassesImplementing:
Answer an Array of all classes that implement the message aSelector.
allUnSentMessages
allUnSentMessagesIn:
Answer the subset of selectorSet which are not sent anywhere in the
system.
allUnSentMessagesWithout:
Answer the set of selectors that are implemented but not sent, computed
in the absence of the supplied classes and messages.
allUnimplementedCalls
Answer an Array of each message that is sent by an expression in a
method but is not implemented by any object in the system.
allUnimplementedNonPrimitiveCalls
Answer an Array of each message that is sent by an expression in a
method but is not implemented by any object in the system.
allUnreferencedClassVariablesOf:
Answer a list of the names of all the receiver's unreferenced class
vars, including those defined in superclasses
allUnsentMessages
SystemNavigation new allUnSentMessages
allUnsentMessagesIn:
Answer the subset of selectorSet which are not sent anywhere in the
system.
allUnsentMessagesWithProgressBar
allUnusedClassesWithout:
Enumerates all classes in the system and returns a list of those that are
apparently unused. A class is considered in use if it (a) has subclasses
or (b) is referred to by some method or (c) has its name in use as a
literal.
browseAllAccessesTo:from:
Create and schedule a Message Set browser for all the receiver's methods
or any methods of a subclass/superclass that refer to the instance variable name.
browseAllCallsOn:
Create and schedule a message browser on each method that refers to
aLiteral. For example, SystemNavigation new browseAllCallsOn: #open:label:.
browseAllCallsOn:and:
Create and schedule a message browser on each method that calls on the
two Symbols, literal1 and literal2. For example, SystemNavigation new
browseAllCallsOn: #at: and: #at:put:.
browseAllCallsOn:from:
Create and schedule a Message Set browser for all the methods that call
on aSymbol.
browseAllCallsOn:localTo:
Create and schedule a message browser on each method in or below the given class that refers to
aLiteral. For example, Smalltalk browseAllCallsOn: #open:label:.
browseAllCallsOnClass:
Create and schedule a message browser on each method that refers to
aClass. For example, SystemNavigation new browseAllCallsOnClass: Object.
browseAllImplementorsOf:
Create and schedule a message browser on each method that implements
the message whose selector is the argument, selector. For example,
Smalltalk browseAllImplementorsOf: #at:put:.
browseAllImplementorsOf:localTo:
Create and schedule a message browser on each method in or below the
given class
that implements the message whose selector is the argument, selector.
For example,
SystemNavigation new browseAllImplementorsOf: #at:put: localTo:
Dictionary.
browseAllImplementorsOfList:
Create and schedule a message browser on each method that implements
the message whose selector is in the argument selectorList. For example,
Smalltalk browseAllImplementorsOf: #(at:put: size).
1/16/96 sw: defer to the titled version
browseAllImplementorsOfList:title:
Create and schedule a message browser on each method that implements
the message whose selector is in the argument selectorList. For
example,
self new browseAllImplementorsOf: #(at:put: size).
1/16/96 sw: this variant adds the title argument.
1/24/96 sw: use a SortedCollection
2/1/96 sw: show normal cursor
browseAllMethodsInCategory:
browseAllObjectReferencesTo:except:ifNone:
Bring up a list inspector on the objects that point to anObject.
If there are none, then evaluate aBlock on anObject.
browseAllReferencesToPool:from:
Open a message list on all messages referencing the given pool
browseAllSelect:
Create and schedule a message browser on each method that, when used
as the block argument to aBlock gives a true result. For example,
SystemNavigation new browseAllSelect: [:method | method numLiterals >
10].
browseAllSelect:name:autoSelect:
Create and schedule a message browser on each method that, when used
as the block argument to aBlock gives a true result. Do not return an
#DoIt traces.
browseAllStoresInto:from:
Create and schedule a Message Set browser for all the receiver's methods
or any methods of a subclass/superclass that refer to the instance variable name.
browseAllUnimplementedCalls
Create and schedule a message browser on each method that includes a
message that is not implemented in any object in the system.
browseAllUnsentMessages
SystemNavigation default browseUnsentMessages
browseClass:
browseClassCommentsWithString:
Smalltalk browseClassCommentsWithString: 'my instances'
browseClassVarRefs:
Put up a menu offering all class variable names; if the user chooses one, open up a message-list browser on all methods
that refer to the selected class variable
browseClassVariables:
browseClassesWithNamesContaining:caseSensitive:
Smalltalk browseClassesWithNamesContaining: 'eMorph' caseSensitive: true
browseHierarchy:
browseImplementorsOf:name:autoSelect:
Create and schedule a senders browser for aSelector.
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
browseMessageList:name:
Create and schedule a MessageSet browser on messageList.
browseMessageList:name:autoSelect:
Create and schedule a MessageSet browser on the message list.
browseMethodsWhoseNamesContain:
Launch a tool which shows all methods whose names contain the given string; case-insensitive.
browseMethodsWithLiteral:
Launch a browser on all methods that contain string literals with aString as a substring. Make the search case-sensitive or insensitive as dictated by the caseSensitive boolean parameter
browseMethodsWithSourceString:
SystemNavigation new browseMethodsWithSourceString: 'SourceString'
browseMethodsWithString:
Launch a browser on all methods that contain string literals with aString as a substring. The search is case-insensitive, unless the shift key is pressed, in which case the search is case-sensitive.
browseMethodsWithString:matchCase:
Launch a browser on all methods that contain string literals with aString as a substring. Make the search case-sensitive or insensitive as dictated by the caseSensitive boolean parameter
browseObsoleteMethodReferences
Open a browser on all referenced behaviors that are obsolete
browseObsoleteReferences
self new browseObsoleteReferences
browseSendersOf:name:autoSelect:
Create and schedule a senders browser for aSelector.
browseUncommentedMethodsWithInitials:
Browse uncommented methods whose initials (in the time-stamp, as logged to disk) match the given initials. Present them in chronological order. CAUTION: It will take several minutes for this to complete.
browseUndeclaredReferences
from Cuis: 0058-browseUndeclared.1
browseUnsentMessagesInClass:
SystemNavigation default browseUnsentMessagesWithProgressBarInClass: BlockContext
browseUnsentMessagesInPackageNamed:
SystemNavigation default browseUnsentMessagesWithProgressBarInPackageNamed: 'Kernel-Contexts'
browserClass
browserClass:
categoriesInPackageNamed:
classFromPattern:withCaption:
If there is a class whose name exactly given by pattern, return it.
If there is only one class in the system whose name matches pattern, return it.
Otherwise, put up a menu offering the names of all classes that match pattern, and return the class chosen, else nil if nothing chosen.
This method ignores tab, space, & cr characters in the pattern
confirmRemovalOf:on:
Determine if it is okay to remove the given selector. Answer 1 if it
should be removed, 2 if it should be removed followed by a senders
browse, and 3 if it should not be removed.
contributionsOf:
SystemNavigation default contributionsOf: 'alain.plantec'
contributorsNotSignatories
SystemNavigation default contributorsNotSignatories
default
defaultBrowserClass
defaultHierarchyBrowserClass
doWithProgressBar:forUnsentMessagesInClass:
doWithProgressBar:forUnsentMessagesInPackageNamed:
doWithProgressBarForAllUnsentMessages:
hierarchyBrowserClass
hierarchyBrowserClass:
hierarchyOfClassesSurrounding:
Answer a list of classes in the hierarchy both above and below the given class
hierarchyOfImplementorsOf:forClass:
Answer a list of classes in the hierarchy both above and below the given class which implement the given selector.
isMessage:sentInClass:
isMessage:sentInClassCategory:
isMessage:sentInPackageNamed:
isThereAnImplementorOf:
Answer true if there is at least one implementor of the selector found
in the system, false if there are no implementors
isUnsentMessage:
methodHierarchyBrowserForClass:selector:
Create and schedule a message set browser on all implementors of the
currently selected message selector. Do nothing if no message is selected.
numberOfImplementorsOf:
Answer a count of the implementors of the given selector found in the
system
obsoleteBehaviors
SystemNavigation default obsoleteBehaviors inspect
obsoleteClasses
SystemNavigation default obsoleteClasses inspect
obsoleteMethodReferences
SystemNavigation default obsoleteMethodReferences
removeUnsentMessagesWithProgressBarInClass:
removeUnsentMessagesWithProgressBarInPackageNamed:
reportSenderCountsFor:
Produce a report on the number of senders of each of the selectors in
the list. 1/27/96 sw
selectAllMethods:
Answer a SortedCollection of each method that, when used as the block
argument to aBlock, gives a true result.
selectAllMethodsNoDoits:
Like allSelect:, but strip out Doits
showMenuOf:withFirstItem:ifChosenDo:
Show a sorted menu of the given selectors, preceded by firstItem, and all
abbreviated to 40 characters. Evaluate choiceBlock if a message is chosen.
showMenuOf:withFirstItem:ifChosenDo:withCaption:
Show a sorted menu of the given selectors, preceded by firstItem, and all abbreviated to 40 characters. Use aCaption as the menu title, if it is not nil. Evaluate choiceBlock if a message is chosen.
signatories
signatoriesString
spawnHierarchyForClass:selector:
Create and schedule a new class hierarchy browser on the requested class/selector.
unimplemented
Answer an Array of each message that is sent by an expression in a method but is not implemented by any object in the system.
unsentMessagesInCategory:
unsentMessagesInClass:
unsentMessagesInPackageNamed:
unsentMessagesWithProgressBarInClass:
unsentMessagesWithProgressBarInPackageNamed:
SystemOrganizer
My instances provide an organization for the classes in the system, just as a ClassOrganizer organizes the messages within a class. The only difference is the methods for fileIn/Out.
addCategory:
categoriesMatching:
Return all matching categories
classesInCategory:
commentInventory:
SystemOrganization commentInventory: 'Morphic*'
fileOut
SystemOrganization fileOut
fileOutCategory:
Store on the file named category (a string) concatenated with '.st' all the
classes associated with the category.
fileOutCategory:on:
Store on the file associated with aFileStream, all the classes associated
with the category and any requested shared pools.
fileOutCategory:on:initializing:
Store on the file associated with aFileStream, all the traits and classes associated
with the category and any requested shared pools in the right order.
goferClassesInCategory:
ifClassOrganizerDo:
Do nothing, since this is not a class organizer
isClassOrganizer
objectForDataStream:
I am about to be written on an object file. Write a path to me in the other system instead.
orderedTraitsIn:
Answer an OrderedCollection containing references to the traits in the
category whose name is the argument, category (a string). The traits
are ordered so they can be filed in.
removeCategoriesMatching:
Remove all matching categories with their classes
removeCategory:
Remove the category named, cat. Create an error notificiation if the
category has any elements in it.
removeMissingClasses
Remove any class names that are no longer in the Smalltalk dictionary. Used for cleaning up after garbage collecting user-generated classes.
removeSystemCategory:
remove all the classes and traits associated with the category
renameCategory:toBe:
Rename a category. No action if new name already exists, or if old name does not exist.
superclassOrder:
Answer an OrderedCollection containing references to the classes in the
category whose name is the argument, category (a string). The classes
are ordered with superclasses first so they can be filed in.
uncommentedClassesIn:
SystemOrganization uncommentedClassesIn: 'Morphic*'
SystemVersion
I am responsible for maintaining what version of Squeak and the VM is running. I also track all of the update items that have been included in the image.
I'm invoked at auto start to get the latest plugins, etc.
check:andRequestPluginUpdate:
checkAndApplyUpdates:
current
currentPluginVersion
date
date:
datedVersion
Answer the version of this release.
highestUpdate
highestUpdate:
includesUpdate:
initialize
Subclasses should redefine this method to perform initializations on instance creation
majorMinorVersion
Return the major/minor version number of the form X.Y, without any 'alpha' or 'beta' or other suffix.
newVersion:
parseVersionString:
pluginVersion:newerThan:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
registerUpdate:
resetHighestUpdate
unregisterUpdate:
updates
version
version:
TextDiffBuilder
A TextDiffBuilder is xxxxxxxxx.
Instance Variables
added: <Object>
dstLines: <Object>
dstMap: <Object>
dstPos: <Object>
matches: <Object>
multipleMatches: <Object>
patchSequence: <Object>
realDst: <Object>
realSrc: <Object>
removed: <Object>
runs: <Object>
shifted: <Object>
srcLines: <Object>
srcMap: <Object>
srcPos: <Object>
added
- xxxxx
dstLines
- xxxxx
dstMap
- xxxxx
dstPos
- xxxxx
matches
- xxxxx
multipleMatches
- xxxxx
patchSequence
- xxxxx
realDst
- xxxxx
realSrc
- xxxxx
removed
- xxxxx
runs
- xxxxx
shifted
- xxxxx
srcLines
- xxxxx
srcMap
- xxxxx
srcPos
- xxxxx
attributesOf:
Private.
Answer the TextAttributes that are used to display text of the given type.
buildDisplayPatch
buildDisplayPatchFrom:to:
buildDisplayPatchFrom:to:inClass:
buildDisplayPatchFrom:to:inClass:prettyDiffs:
buildPatchSequence
@@ TODO: Das funktioniert noch nicht für n-m matches
buildReferenceMap
collectRunFrom:startingWith:into:
destString:
detectShiftedRuns
formatLine:
from:to:
generatePatchSequence
hasMultipleMatches
incorporateAddsInto:
Incorporate adds
incorporateMatchesInto:
Incorporate matches
incorporateRemovalsInto:
Incorporate removals
pointEqualBlock
pointHashBlock
printPatchSequence:on:
processDiagonals
processDiagonalsFrom:
processShiftedRuns
remove:from:
sourceString:
split:
split:by:
splitCharacter
stringHashBlock
Return a block for use in string hashing
validateRuns:
ThirtyTwoBitRegister
I represent a 32-bit register. An instance of me can hold any non-negative integer in the range [0..(2^32 - 1)]. Operations are performed on my contents in place, like a hardware register, and results are always modulo 2^32.
This class is primarily meant for use by the SecureHashAlgorithm class.
+=
Replace my contents with the sum of the given register and my current contents.
asByteArray
asInteger
Answer the integer value of my current contents.
asReverseInteger
Answer the byte-swapped integer value of my current contents.
bitAnd:
Replace my contents with the bitwise AND of the given register and my current contents.
bitInvert
Replace my contents with the bitwise inverse my current contents.
bitOr:
Replace my contents with the bitwise OR of the given register and my current contents.
bitShift:
Replace my contents with the bitShift of anInteger.
bitXor:
Replace my contents with the bitwise exclusive OR of the given register and my current contents.
byte1:byte2:byte3:byte4:
byteAt:
copy
Use the clone primitive for speed.
hi
leftRotateBy:
Rotate my contents left by the given number of bits, retaining exactly 32 bits.
load:
Set my contents to the value of given integer.
loadFrom:at:
Load my 32-bit value from the four bytes of the given ByteArray starting at the given index. Consider the first byte to contain the most significant bits of the word (i.e., use big-endian byte ordering).
low
new
printOn:
Print my contents in hex with a leading 'R' to show that it is a register object being printed.
reverseLoadFrom:at:
Load my 32-bit value from the four bytes of the given ByteArray
starting at the given index. Consider the first byte to contain the most
significant bits of the word (i.e., use big-endian byte ordering).
storeInto:at:
Store my 32-bit value into the four bytes of the given ByteArray starting at the given index. Consider the first byte to contain the most significant bits of the word (i.e., use big-endian byte ordering).
ToolSet
ToolSet defines an interface that clients can use to request programmer facilities such as browsers, inspectors, debuggers, message sets etc.
askForDefault
basicInspect:
browse:selector:
browseChangeSetsWithClass:selector:
browseHierarchy:selector:
browseImplementorsOf:name:autoSelect:
browseMessageNames:
browseMessageSet:name:autoSelect:
browseSendersOf:name:autoSelect:
browseVersionsOf:selector:
codeCompletionAround:textMorph:keyStroke:
debug:context:label:contents:fullView:
debugContext:label:contents:
debugError:
debugSyntaxError:
explore:
inspect:
inspect:label:
inspectorClassOf:
interrupt:label:
menuItems
openChangedMessageSet:
openClassListBrowser:title:
TwoLevelDictionary
A simple dictionary for the use of the TextDiffBuilder. Keys are presumed to be Points and a significant speed advantage is gained by using a dictionary of dictionaries. The first is keyed by the x-values and the second by the y-values. Only the minimum necessary protocol is implemented.
at:
Primitive. Assumes receiver is indexable. Answer the value of an
indexable element in the receiver. Fail if the argument index is not an
Integer or is out of bounds. Essential. See Object documentation
whatIsAPrimitive.
at:put:
Primitive. Assumes receiver is indexable. Store the argument value in
the indexable element of the receiver indicated by index. Fail if the
index is not an Integer or is out of bounds. Or fail if the value is not of
the right type for this kind of collection. Answer the value that was
stored. Essential. See Object documentation whatIsAPrimitive.
initialize
Subclasses should redefine this method to perform initializations on instance creation
keysDo:
twoLevelKeys
TwoLevelSet
A simple set for the use of the TextDiffBuilder. Elements are presumed to be Points and a significant speed advantage is gained by using a dictionary of sets. The first is keyed by the x-values and the second contains the y-values. Only the minimum necessary protocol is implemented.
add:
copy
Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.
detect:
do:
includes:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isEmpty
remove:
removeAllXAndY:
UnixPlatform
An UnixPlatform is xxxxxxxxx.
Instance Variables
isActivePlatform
platformFamily
Returns a symbol specific to the platform family (MacOSX, Windows, Unix, RiscOS).
This may need to be extended if there are new platforms added or significant differences within a platform family arise (as was the case between MacOS 9 and X).
Utilities
A repository for general and miscellaneous utilities; much of what is here are in effect global methods that don't naturally attach to anything else. 1/96 sw
addUpdateServer:
applyUpdatesFromDisk
applyUpdatesFromDiskToUpdateNumber:stopIfGap:
assureAbsenceOfUnstableUpdateStream
assureAvailabilityOfUnstableUpdateStream
assureMostRecentSubmissionExists
authorInitials
authorInitialsPerSe
authorName
authorName:
authorNamePerSe
awaitMouseUpIn:repeating:ifSucceed:
awaitMouseUpIn:whileMouseDownDo:whileMouseDownInsideDo:ifSucceed:
broadcastUpdatesFrom:to:except:
browseRecentSubmissions
changeStamp
changeStampPerSe
chooseFileWithSuffix:
chooseFileWithSuffixFromList:withCaption:
chooseUpdateList
classCategoriesStartingWith:
classFromPattern:withCaption:
cleanseOtherworldlySteppers
closeAllDebuggers
commandKeyMappings
compileUsingClosures
convertCRtoLF:
createPageTestWorkspace
dateStamp
dateTimeSuffix
decimalPlacesForFloatPrecision:
decommissionTheAllCategory
doesMethod:forClass:bearInitials:
doesNotUnderstand:
Handle the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message (typically sent from the machine when a message is sent to the receiver and no method is defined for that selector).
dumpAnyOldStyleRecentSubmissions
emergencyCollapse
event:
extractThisVersion:
fileInFromUpdatesFolder:
fixStamp:
fixUpProblemsWithAllCategory
floatPrecisionForDecimalPlaces:
garbageCollectAndReport
getUpdateDirectoryOrNil
getterSelectorFor:
graphicsFileSuffixes
informUser:during:
informUserDuring:
inherentSelectorForGetter:
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeClosures
inspectCollection:notifying:
instanceComparisonsBetween:and:
keyLike:satisfying:
keyLike:withTrailing:satisfying:
lastUpdateNum:
methodDiffFor:class:selector:prettyDiffs:
methodsWithInitials:
monthDayTime24StringFrom:
monthDayTimeStringFrom:
mostRecentlySubmittedMessage
newUpdatesOn:special:throughNumber:
nextClockwiseSideAfter:
noteMethodSubmission:forClass:
numberOfRecentSubmissionsToStore
numberOfRecentSubmissionsToStore:
objectStrmFromUpdates:
openCommandKeyHelp
openRecentSubmissionsBrowser
oppositeCornerFrom:
oppositeModeTo:
oppositeSideTo:
parseListContents:
pointersTo:
pointersTo:except:
pointersToItem:of:
position:atVersion:
purgeFromRecentSubmissions:
purgeRecentSubmissionsOfMissingMethods
readNextUpdateFromServer
readNextUpdatesFromDisk:
readServer:special:updatesThrough:saveLocally:updateImage:
readServerUpdatesSaveLocally:updateImage:
readServerUpdatesThrough:saveLocally:updateImage:
recentMethodSubmissions
recentSubmissionsWindow
reconstructTextWindowsFromFileNamed:
registerInFlapsRegistry
reportSenderCountsFor:
resetServers
retrieveUrls:ontoQueue:withWaitSema:
revertLastMethodSubmission
saveUpdate:onFile:
seeClassSide
All the code for Utilitites is on the class side
serverUrls
setAuthorInitials
setAuthorInitials:
setAuthorName
setClassAndSelectorFrom:in:
setUpdateServer:
setterSelectorFor:
showFormsAcrossTopOfScreen:
showFormsDictAcrossTopOfScreen:
simpleSetterFor:
startUp
steplistToolsWorkspace
storeTextWindowContentsToFileNamed:
summariesForUpdates:through:
timeStampForMethod:
unload
updateComment
updateFromServer
updateFromServerThroughUpdateNumber:
updateUrlLists
writeList:toStream:
zapUpdateDownloader
WeakActionSequenceTrappingErrors
A WeakActionSequenceTrappingErrors is xxxxxxxxx.
Instance Variables
asActionSequenceTrappingErrors
value
Do the same as my parent, but make sure that all actions that do not
give errors are evaluated before resignaling the ones that gave errors
(giving the chance to clients to handle them).
valueStartingFrom:
Do the same as my parent, but make sure that all actions that do not
give errors are evaluated before resignaling the ones that gave errors
(giving the chance to clients to handle them).
valueWithArguments:
Do the same as my parent, but make sure that all actions that do not
give errors are evaluated before resignaling the ones that gave errors
(giving the chance to clients to handle them).
valueWithArguments:startingFrom:
Do the same as my parent, but make sure that all actions that do not
give errors are evaluated before resignaling the ones that gave errors
(giving the chance to clients to handle them).
WebBrowser
A WebBrowser is xxxxxxxxx.
Instance Variables
Win32Platform
A Win32Platform is xxxxxxxxx.
Instance Variables
isActivePlatform
platformFamily
Returns a symbol specific to the platform family (MacOSX, Windows, Unix, RiscOS).
This may need to be extended if there are new platforms added or significant differences within a platform family arise (as was the case between MacOS 9 and X).
virtualKey:
WindowColorRegistry
I provide to the applications developer a place where they can register their WindowColorSpecification for their application's windows.
initialize
Subclasses should redefine this method to perform initializations on instance creation
refresh
registerColorSpecification:toClassNamed:
registeredWindowColorSpecFor:
registeredWindowColorSpecs
registry
seeClassSide
All the code for WindowColorRegistry is on the class side.
unregisterColorSpecificationForClassNamed: