Squeak Class Documentation category index | class index  
 
Object
  category: Kernel-Objects
  superclass: ProtoObject
  subclasses: BalloonState B3DCamera SoundCodec WonderlandEvent DocLibrary StandardFileMenuResult FlashKeyframe FlashSoundInformation Note Discussion UndefinedObject Boolean InputSensor SimpleMIDIPort AliceScheduler Alarm SqueakPage AliceHierarchical FillStyle B3DGeometry Authorizer B3DPrimitiveFaceAttributes ConnectionQueue UndoByStopping Password B3DPoolDefiner B3DActiveEdgeTable SharedQueue IRCProtocolMessage Scheduler ThreeDSParser ChangeRecord MidiPrimTester BitBlt Compiler UndoRotationChange HTMLformatter FlashKeyframes WonderlandUndoStack SoundPlayer Controller UndoColorChange MailAddressParser PopUpMenu IRCChannelSummary B3DLightSource AbstractAnimation B3DPrimitiveEdgeList WindowingTransformation Random FormButtonCache BalloonEdgeData View Magnitude AbstractScoreEvent ControlManager TTKernPair B3DSceneObject LimitingLineStreamWrapper TTFontReader Message PseudoClass B3DScene EllipseMidpointTracer DamageRecorder CharRecog SystemMonitor FlashColorTransform BalloonBezierSimulation RemoteString Model UndoShowHide Color ImageReadWriter IRCMessagePattern TextContainer Comment MIDIScore TTGlyph AsyncFile UndoSizeChange ClassCategoryReader URLmap RealEstateAgent Rectangle BalloonSolidFillSimulation CObjectAccessor JPEGHuffmanTable MorphExtension AliceWorld NetNameResolver MIDISynth Session ThreeDSChunkDescription TTFontDescription WordNet ClassOrganizer Hierarchical Action ProcessorScheduler Scanner UndoPOVChange MIMEDocument MethodFinder SystemTracer TestCClass2 FWT Collection TextAttribute UndoAction MIDIFileReader IRCMessageSet BalloonEngine UndoPositionChange Stream UndoParentChange HtmlParser B3DPrimitiveObject B3DEnginePart B3DPrimitiveVertex B3DPrimitiveRasterizerData Link WonderlandReaction BalloonBuffer B3DPrimitiveRasterizerState TextDiffBuilder InterpreterSupportCode TextPrinter Delay SerialPort MimeConverter Behavior ServerAction FlashSoundEnvelope AbstractSound FileDirectory DeepCopier CornerRounder TextLine FlashFileWriter CompressedBoundaryShape FlashStreamingSound TTFontTableDirEntry AlicePoolDefiner MailAddressToken InterpreterProxy BalloonLineSimulation FlashFileReader TextOnCurveContainer MailDBFile DiskProxy LineSegment TTContourConstruction WonderlandVerifier Point DisplayObject CompressedSoundData InstructionStream UndoAnimation BalloonFillData HtmlEntity PWS AliceNamespace B3DPrimitiveEdge Url B3DFillList B3DVertexBuffer WorldViewModel FormInput Preferences SwikiPage GraphicSymbolInstance IndexFileEntry FlashLineStyle TestCClass3 Interpolateable Wonderland FakeClassPool TestCClass1 UndoTextureChange PluggableTest UndoVisibilityChange KeyboardBuffer ParseStack Morph MIDISynthChannel ScrollingToolHolder DisplayTransform ObjectScanner Envelope TTPoint B3DScanner UndoChangeList B3DPrimitiveFace Utilities B3DCameraPerspective SampledInstrument MIDIInputParser IRCMessage SqueakPageCache PinSpec HtmlToken StandardScriptingSystem AliceUndoAnimation AliceUpdateable FlashCodec ListItemWrapper ClassBuilder FFT B3DSimpleMeshVertex VRMLEnumerator VRMLNodeAttribute VRMLNodeSpec VRMLStream VRMLWriter Foo2 NullEncoder PostscriptCharacterScanner PostscriptDummyWarp ExceptionSet ExceptionTester Applescript PlayingCard SyntaxAttribute Exception TextStyle DigitalSignatureAlgorithm SecureHashAlgorithm ThirtyTwoBitRegister Clause DECTalkReader KlattSegment KlattSegmentParameter KlattSegmentSet KlattSynthesizer LiljencrantsFant PHOReader Phoneme PhonemeSet PhoneticRule PhoneticTranscriber Phrase Speaker Syllable UtteranceVisitor Voice VoiceEvent CosineInterpolator Word ZipEncoderNode ZipEncoderTree ExternalObject ExternalType HaloSpec MessageSend FreeCellStatistics WonderlandStyle EventModel ChangeSet ClassChangeRecord MethodChangeRecord POEdgeList POHalfedge POObject POSimplePolygon POTriangle VRMLBaseNode VRMLNodeParser MIMEHeaderValue MailNotifier HtmlFormatter FontSet CCodeGenerator InterpreterPlugin LargeIntegersTest PhonemeRecord AbstractFont ColorMap FXBlt ExternalSemaphoreTable Socket ComplexProgressIndicator CurrentProjectRefactoring TheWorldMenu GZipSurrogateStream ImageSegment FreeTranslation EToyIncomingMessage CanvasDecoder FontCache LoopbackStringSocket MorphicEventDecoder MorphicEventEncoder NebraskaClient NebraskaDebug EToyPeerToPeer Command CommandHistory VRMLScene CodeLoader HTTPLoader HTTPRequest AbstractLauncher AutoStart TParseNode FilePackage PDARecord MorphicEventDispatcher MorphicEvent MouseOverHandler ProjectLoading WorldState SlotInformation VariableDock LayoutCell LayoutFrame LayoutPolicy LayoutProperties CanvasEncoder SoundRecorder AbstractInstructionPrinter Clipboard PowerManagement TMethod SecurityManager ScriptInstantiation MailMessage AGenieIntroduction CRChar CRFeature CRLookupItem CRParameters CRRecognizerCoordinates CRGesture CRGestureProcessor PrintSpecifications Archive ArchiveMember ObjectMemory HTTPClient ResourceLocator ResourceManager JPEGColorComponent MPEGFile MPEGPlayer StarSqueakPatch StarSqueakTurtle ButtonProperties MPEGPlayer2 SystemVersion Preference TwoLevelDictionary TwoLevelSet Flaps CharacterScanner NewParagraph TextComposer GeePrinter LineIntersectionEvent LineIntersections Subdivision SubdivisionHalfEdge SubdivisionQuadEdge StrokePoint StrokeSimplifier PoohTriangle MethodReference ExternalSettings ResourceCollector ServerDirectory SkipListNode ParseNode ElementTranslation ObjectWithDocumentation SUnitNameResolver TestResource TestSuite TestResult TestCase MouseClickState EventHandler ActorState DescriptionForPartsBin Presenter ChessBoard ChessHistoryTable ChessMove ChessMoveGenerator ChessPlayer ChessPlayerAI ChessTTEntry ChessTranspositionTable BorderStyle SunAudioFileWriter AIFFFileReader JPEGMovieFile CREcho CRRecognizer DocumentationBuilder DocumentationClass DocumentationIndex RecursiveReplacer TemplateReplacer

Object is the root class for almost all of the other classes in the class hierarchy. The exceptions are ProtoObject (the superclass of Object) and its subclasses.

Class Object provides default behavior common to all normal objects, such as access, copying, comparison, error handling, message sending, and reflection. Also utility messages that all objects should respond to are defined here.

Object has no instance variables, nor should any be added. This is due to several classes of objects that inherit from Object that have special implementations (SmallInteger and UndefinedObject for example) or the VM knows about and depends on the structure and layout of certain standard classes.

Class Variables:
DependentsFields an IdentityDictionary
Provides a virtual 'dependents' field so that any object may have one
or more dependent views, synchronized by the changed:/update: protocol.
Note that class Model has a real slot for its dependents, and overrides
the associated protocol with more efficient implementations.
EventsFields an IdentityDictionary that maps each object to its dependents.
Registers a message send (consisting of a selector and a receiver object)
which should be performed when anEventSymbol is triggered by the receiver.
Part of a new event notification framework which could eventually replace
the existing changed/update mechanism. It is intended to be compatible
with Dolphin Smalltalk and VSE as much as possible.

Because Object is the root of the inheritance tree, methods are often defined in Object to give all objects special behaviors needed by certain subsystems or applications, or to respond to certain general test messages such as isMorph.

instance methods
  Camp Smalltalk
  sunitAddDependent:
sunitChanged:
sunitRemoveDependent:

  accessing
  addInstanceVarNamed:withValue:
at:
at:modify:
at:put:
basicAt:
basicAt:put:
basicSize
bindWithTemp:
doIfNotNil:
ifNotNilDo:
in:
presenter
readFromString:
size
yourself

  associating
  ->

  binding
  bindingOf:

  casing
  caseOf:
caseOf:otherwise:

  class membership
  class
inheritsFromAnyIn:
isKindOf:
isKindOf:orOf:
isMemberOf:
respondsTo:
xxxClass

  comparing
  =
closeTo:
hash
hashMappedBy:
identityHashMappedBy:
identityHashPrintString
~=

  converting
  adaptToFloat:andSend:
adaptToFraction:andSend:
adaptToInteger:andSend:
as:
asDraggableMorph
asOrderedCollection
asString
complexContents
mustBeBoolean
printDirectlyToDisplay
withoutListWrapper

  copying
  clone
copy
copyAddedStateFrom:
copyFrom:
copySameFrom:
copyTwoLevel
deepCopy
initialDeepCopierSize
shallowCopy
veryDeepCopy
veryDeepCopyWith:
veryDeepCopyWithSiblingOf:
veryDeepFixupWith:
veryDeepInner:
veryDeepPvtSibling:

  dependents access
  addDependent:
breakDependents
canDiscardEdits
dependents
evaluate:wheneverChangeIn:
hasUnacceptedEdits
myDependents
myDependents:
release
removeDependent:

  drag and drop
  acceptDroppingMorph:event:inMorph:
dragAnimationFor:transferMorph:
dragPassengerFor:inMorph:
dragTransferType
dragTransferTypeForMorph:
wantsDroppedMorph:event:inMorph:

  error handling
  assert:
cannotInterpret:
caseError
confirm:
confirm:orCancel:
doesNotUnderstand:
error:
externalCallFailed
halt
halt:
handles:
notify:
notify:at:
notifyWithLabel:
primitiveFailed
shouldNotImplement
subclassResponsibility
tryToDefineVariableAccess:

  events
  myEvents
myEvents:
noEventsDo:
removeAllEventsTriggered
removeEvent:
removeEventsTriggeredFor:
trigger:
trigger:with:
trigger:withArguments:
when:perform:
when:send:to:
when:send:to:with:
when:send:to:withArguments:
when:sendTo:

  filter streaming
  byteEncode:
drawOnCanvas:
elementSeparator
encodePostscriptOn:
flattenOnStream:
fullDrawPostscriptOn:
printOnStream:
putOn:
storeOnStream:
writeOnFilterStream:

  finalization
  actAsExecutor
executor
finalize
retryWithGC:until:

  flagging
  isThisEverCalled
isThisEverCalled:
logEntry
logExecution
logExit

  logging
  flag:log:
flag:streamLog:

  macpal
  beep:
codeStrippedOut:
contentsChanged
currentEvent
currentHand
currentVocabulary
currentWorld
flash
ifKindOf:thenDo:
instanceVariableValues
isUniversalTiles
objectRepresented
playSoundNamed:
refusesToAcceptCode
scriptPerformer
slotInfo

  message handling
  perform:
perform:orSendTo:
perform:with:
perform:with:with:
perform:with:with:with:
perform:withArguments:
perform:withArguments:inSuperclass:

  objects from disk
  comeFullyUpOnReload:
convertToCurrentVersion:refStream:
indexIfCompact
objectForDataStream:
readDataFrom:size:
saveOnFile
storeDataOn:

  parts bin
  descriptionForPartsBin

  printing
  fullPrintString
isLiteral
longPrintOn:
longPrintOn:limitedTo:indent:
longPrintString
nominallyUnsent:
printOn:
printString
printStringLimitedTo:
propertyList
reportableSize
storeOn:
storeString
stringForReadout
stringRepresentation

  private
  errorImproperStore
errorNonIntegerIndex
errorNotIndexable
errorSubscriptBounds:
primitiveError:
species
storeAt:inTempFrame:

  private-example
 

  scripting
  adaptedToWorld:
contentsGetz:
defaultFloatPrecisionFor:
evaluateUnloggedForSelf:
methodInterfacesForCategory:inVocabulary:limitClass:
methodInterfacesForInstanceVariablesCategoryIn:
methodInterfacesForScriptsCategoryIn:
selfWrittenAsIll
selfWrittenAsIm
selfWrittenAsMe
selfWrittenAsMy
selfWrittenAsThis

  scripts-kernel
  universalTilesForGetterOf:
universalTilesForInterface:

  system primitives
  asOop
becomeForward:
className
creationStamp
instVarAt:
instVarAt:put:
instVarNamed:
instVarNamed:put:
oopString
primitiveChangeClassTo:
rootStubInImageSegment:
someObject
tryNamedPrimitive
tryNamedPrimitive:
tryNamedPrimitive:with:
tryNamedPrimitive:with:with:
tryNamedPrimitive:with:with:with:
tryNamedPrimitive:with:with:with:with:
tryNamedPrimitive:with:with:with:with:with:
tryNamedPrimitive:with:with:with:with:with:with:
tryNamedPrimitive:with:with:with:with:with:with:with:
tryPrimitive:withArgs:

  testing
  basicType
beViewed
costumes
haltIfNil
haveFullProtocolBrowsed
haveFullProtocolBrowsedShowingSelector:
isBehavior
isCollection
isColor
isFloat
isForm
isFraction
isInteger
isMorph
isMorphicEvent
isNumber
isPoint
isPseudoContext
isStream
isString
isText
isTransparent
isVariableBinding
isWebBrowser
knownName
name
nameForViewer
notNil
openInstanceBrowserWithTiles
showDiffs
stepAt:in:
stepIn:
stepTime
stepTimeIn:
vocabularyDemanded
wantsDiffFeedback
wantsSteps
wantsStepsIn:

  translation support
  asIf:var:
asIf:var:asValue:
asIf:var:put:
asOop:
asSmallIntegerObj
asValue:
cCode:
cCode:inSmalltalk:
cCoerce:to:
export:
inline:
primitive:parameters:receiver:
remapOop:in:
returnTypeC:
sharedCodeNamed:inCase:
stAt:
stAt:put:
stSize
static:
suppressFailureGuards:
var:declareC:
var:type:
var:type:array:

  undo
  capturedState
commandHistory
purgeAllCommands
redoFromCapturedState:
refineRedoTarget:selector:arguments:in:
refineUndoTarget:selector:arguments:in:
rememberCommand:
rememberUndoableAction:named:
undoFromCapturedState:

  updating
  changed
changed:
handledListVerification
noteSelectionIndex:for:
okToChange
update:
updateListsAndCodeIn:
windowIsClosing

  user interface
  addModelItemsToWindowMenu:
addModelMenuItemsTo:forMorph:hand:
asExplorerString
basicInspect
beep
browseHierarchy
defaultBackgroundColor
defaultLabelForInspector
eToyStreamedRepresentationNotifying:
explore
fullScreenSize
hasContentsInExplorer
inform:
initialExtent
inspect
inspectWithLabel:
launchPartVia:
launchTileToRefer
modelSleep
modelWakeUp
modelWakeUpIn:
mouseUpBalk:
newTileMorphRepresentative
notYetImplemented
windowActiveOnFirstClick
windowReqNewLabel:

  viewer
  assureUniClass
belongsToUniClass
browseOwnClassSubProtocol
categoriesForViewer:
categoriesForVocabulary:limitClass:
categoryElementsFor:
chooseNewNameForReference
defaultLimitClassForVocabulary:
defaultNameStemForInstances
elementTypeFor:vocabulary:
externalName
graphicForViewerTab
hasUserDefinedSlots
infoFor:inViewer:
initialTypeForSlotNamed:
isPlayerLike
methodInterfacesInPresentationOrderFrom:forCategory:
newScriptorAround:
offerViewerMenuFor:event:
offerViewerMenuForEvt:morph:
renameScript:
tilePhrasesForCategory:inViewer:
tileToRefer
uniqueInstanceVariableNameLike:excluding:
uniqueNameForReference
uniqueNameForReferenceOrNil
updateThresholdForGraphicInViewerTab
usableMethodInterfacesIn:
usablePhraseSpecsIn:

  world hacking
  couldOpenInMorphic

class methods
  class initialization
  flushDependents
flushEvents
initialize
initializeDependentsFields
initializeEventsFields
reInitializeDependentsFields
reInitializeEventsFields

  documentation
  howToModifyPrimitives
whatIsAPrimitive

  instance creation
  categoryForUniclasses
chooseUniqueClassName
initialInstance
initializedInstance
instanceOfUniqueClass
instanceOfUniqueClassWithInstVarString:andClassInstVarString:
isUniClass
newFrom:
newUniqueClassInstVars:classInstVars:
newUserInstance
readCarefullyFrom:
readFrom:

  objects from disk
  createFrom:size:version:

  plugin generation
  ccg:emitLoadFor:from:on:
ccg:generateCoerceToOopFrom:on:
ccg:generateCoerceToValueFrom:on:
ccg:prolog:expr:index:
ccgCanConvertFrom:
ccgDeclareCForVar:

  private
  releaseExternalSettings

instance methods
  Camp Smalltalk top  
 

sunitAddDependent:


 

sunitChanged:


 

sunitRemoveDependent:


  accessing top  
 

addInstanceVarNamed:withValue:

Add an instance variable named aName and give it value aValue


 

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:modify:

Replace the element of the collection with itself transformed by the block


 

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.


 

basicAt:

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. Do not override in a subclass. See
Object documentation whatIsAPrimitive.


 

basicAt:put:

Primitive. Assumes receiver is indexable. Store the second 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. Do not override in a subclass. See Object
documentation whatIsAPrimitive.


 

basicSize

Primitive. Answer the number of indexable variables in the receiver.
This value is the same as the largest legal subscript. Essential. Do not
override in any subclass. See Object documentation whatIsAPrimitive.


 

bindWithTemp:


 

doIfNotNil:

Deprecated -- use ifNotNilDo:


 

ifNotNilDo:

Evaluate the given block with the receiver as its argument.


 

in:

Evaluate the given block with the receiver as its argument.


 

presenter

Answer the presenter object associated with the receiver. For morphs, there is in effect a clear containment hierarchy of presenters (accessed via their association with PasteUpMorphs); for arbitrary objects the hook is simply via the current world, at least at present.


 

readFromString:

Create an object based on the contents of aString.


 

size

Primitive. Answer the number of indexable variables in the receiver.
This value is the same as the largest legal subscript. Essential. See Object
documentation whatIsAPrimitive.


 

yourself

Answer self.


  associating top  
 

->

Answer an Association between self and anObject


  binding top  
 

bindingOf:


  casing top  
 

caseOf:

The elements of aBlockAssociationCollection are associations between blocks.
Answer the evaluated value of the first association in aBlockAssociationCollection
whose evaluated key equals the receiver. If no match is found, report an error.


 

caseOf:otherwise:

The elements of aBlockAssociationCollection are associations between blocks.
Answer the evaluated value of the first association in aBlockAssociationCollection
whose evaluated key equals the receiver. If no match is found, answer the result
of evaluating aBlock.


  class membership top  
 

class

Primitive. Answer the object which is the receiver's class. Essential. See
Object documentation whatIsAPrimitive.


 

inheritsFromAnyIn:

Answer whether the receiver inherits from any class represented by any element in the list. The elements of the list can be classes, class name symbols, or strings representing possible class names. This allows speculative membership tests to be made even when some of the classes may not be known to the current image, and even when their names are not interned symbols.


 

isKindOf:

Answer whether the class, aClass, is a superclass or class of the receiver.


 

isKindOf:orOf:

Answer whether either of the classes, aClass or anotherClass,, is a superclass or class of the receiver. A convenience; could be somewhat optimized


 

isMemberOf:

Answer whether the receiver is an instance of the class, aClass.


 

respondsTo:

Answer whether the method dictionary of the receiver's class contains
aSymbol as a message selector.


 

xxxClass

For subclasses of nil, such as ObjectOut


  comparing top  
 

=

Answer whether the receiver and the argument represent the same
object. If = is redefined in any subclass, consider also redefining the
message hash.


 

closeTo:

Answer whether the receiver and the argument represent the same
object. If = is redefined in any subclass, consider also redefining the
message hash.


 

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 =


 

hashMappedBy:

Answer what my hash would be if oops changed according to map.


 

identityHashMappedBy:

Answer what my hash would be if oops changed according to map.


 

identityHashPrintString

'fred' identityHashPrintString


 

~=

Answer whether the receiver and the argument do not represent the
same object.


  converting top  
 

adaptToFloat:andSend:

If no method has been provided for adapting an object to a Float,
then it may be adequate to simply adapt it to a number.


 

adaptToFraction:andSend:

If no method has been provided for adapting an object to a Fraction,
then it may be adequate to simply adapt it to a number.


 

adaptToInteger:andSend:

If no method has been provided for adapting an object to a Integer,
then it may be adequate to simply adapt it to a number.


 

as:

Create an object of class aSimilarClass that has similar contents to the receiver.


 

asDraggableMorph


 

asOrderedCollection

Answer an OrderedCollection with the receiver as its only element.


 

asString

Answer a string that represents the receiver.


 

complexContents


 

mustBeBoolean

Catches attempts to test truth of non-Booleans. This message is sent from the
interpreter.
The sending context is rewound to just before the jump causing this exception.


 

printDirectlyToDisplay

For debugging: write the receiver's printString directly to the display at (0, 100); senders of this are detected by the check-for-slips mechanism.


 

withoutListWrapper


  copying top  
 

clone


 

copy

Answer another instance just like the receiver. Subclasses typically
override this method; they typically do not override shallowCopy.


 

copyAddedStateFrom:

Copy over the values of instance variables added by the receiver's class from anotherObject to the receiver. These will be remapped in mapUniClasses, if needed.


 

copyFrom:

Copy to myself all instance variables I have in common with anotherObject. This is dangerous because it ignores an object's control over its own inst vars.


 

copySameFrom:

Copy to myself all instance variables named the same in otherObject.
This ignores otherObject's control over its own inst vars.


 

copyTwoLevel

one more level than a shallowCopy


 

deepCopy

Answer a copy of the receiver with its own copy of each instance
variable.


 

initialDeepCopierSize

default value is 4096; other classes may override this, esp. for smaller (=faster) sizes


 

shallowCopy

Answer a copy of the receiver which shares the receiver's instance variables.


 

veryDeepCopy

Do a complete tree copy using a dictionary. An object 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.


 

veryDeepCopyWith:

Copy me and the entire tree of objects I point to. An object in the tree twice is copied once, and both references point to him. deepCopier holds a dictionary of objects we have seen. Some classes refuse to be copied. Some classes are picky about which fields get deep copied.


 

veryDeepCopyWithSiblingOf:

Do a complete tree copy using a dictionary. Substitute a clone of oldObject (a Player) for it. Normally, a Player or non systemDefined object would have a new class. We do not want one this time. An object 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.


 

veryDeepFixupWith:

I have no fields and no superclass. Catch the super call.


 

veryDeepInner:

No special treatment for inst vars of my superclasses. Override when some need to be weakly copied. Object>>veryDeepCopyWith: will veryDeepCopy any inst var whose class does not actually define veryDeepInner:


 

veryDeepPvtSibling:

Copy the instance variables of a new sibling of a Player. Private method.


  dependents access top  
 

addDependent:

Make the given object one of the receiver's dependents.


 

breakDependents

Remove all of the receiver's dependents.


 

canDiscardEdits

Answer true if none of the views on this model has unaccepted edits that matter.


 

dependents

Answer a collection of objects that are 'dependent' on the receiver;
that is, all objects that should be notified if the receiver changes.


 

evaluate:wheneverChangeIn:


 

hasUnacceptedEdits

Answer true if any of the views on this object has unaccepted edits.


 

myDependents

Private. Answer a list of all the receiver's dependents.


 

myDependents:

Private. Set (or remove) the receiver's dependents list.


 

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.


 

removeDependent:

Remove the given object as one of the receiver's dependents.


  drag and drop top  
 

acceptDroppingMorph:event:inMorph:


 

dragAnimationFor:transferMorph:

Default do nothing


 

dragPassengerFor:inMorph:


 

dragTransferType


 

dragTransferTypeForMorph:


 

wantsDroppedMorph:event:inMorph:


  error handling top  
 

assert:

Throw an assertion error if aBlock does not evaluates to true.


 

cannotInterpret:

Handle the fact that there was an attempt to send the given message to the receiver but a null methodDictionary was encountered while looking up the message selector. Hopefully this is the result of encountering a stub for a swapped out class which induces this exception on purpose.


 

caseError

Report an error from an in-line or explicit case statement.


 

confirm:

Put up a yes/no menu with caption queryString. Answer true if the
response is yes, false if no. This is a modal question--the user must
respond yes or no.


 

confirm:orCancel:

Put up a yes/no/cancel menu with caption aString. Answer true if
the response is yes, false if no. If cancel is chosen, evaluate
cancelBlock. This is a modal question--the user must respond yes or no.


 

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).


 

error:

Throw a generic Error exception.


 

externalCallFailed

A call to an external function has failed.


 

halt

This is the typical message to use for inserting breakpoints during
debugging. It behaves like halt:, but does not call on halt: in order to
avoid putting this message on the stack. Halt is especially useful when
the breakpoint message is an arbitrary one.


 

halt:

This is the typical message to use for inserting breakpoints during
debugging. It creates and schedules a Notifier with the argument,
aString, as the label.


 

handles:

This method exists to break an endless loop in Exception>>findHandlerFrom: if the exception
is invalid


 

notify:

Create and schedule a Notifier with the argument as the message in
order to request confirmation before a process can proceed.


 

notify:at:

Create and schedule a Notifier with the argument as the message in
order to request confirmation before a process can proceed. Subclasses can
override this and insert an error message at location within aString.


 

notifyWithLabel:

Create and schedule a Notifier with aString as the window label as well as the contents of the window, in order to request confirmation before a process can proceed.


 

primitiveFailed

Announce that a primitive has failed and there is no appropriate
Smalltalk code to run.


 

shouldNotImplement

Announce that, although the receiver inherits this message, it should
not implement it.


 

subclassResponsibility

This message sets up a framework for the behavior of the class'
subclasses. Announce that the subclass should have implemented this
message.


 

tryToDefineVariableAccess:

See if the message just wants to get at an instance variable of this class. Ask the user if its OK. If so, define the message to read or write that instance or class variable and retry.


  events top  
 

myEvents

Private. Answer a Dictionary with the receiver's events or nil if no
events have been registered. Subclasses may overwrite this method
for performance reasons.


 

myEvents:

Private. Set (or remove) the receiver's dictionary of events.
Subclasses may overwrite this method for performance reasons.


 

noEventsDo:

Evaluate aBlock while ensuring that the receiver will not trigger
any events. Answer the result of evaluating aBlock.


 

removeAllEventsTriggered

Remove all events triggered by the receiver.


 

removeEvent:


 

removeEventsTriggeredFor:

Remove all that events trigged by the receiver which would have
been send to anObject.


 

trigger:

Evaluate all message sends registered for anEventSymbol.


 

trigger:with:

Evaluate all message sends registered for anEventSymbol
and pass aParamter to the registered actions.


 

trigger:withArguments:

Evaluate all message sends registered for anEventSymbol
and pass anArray to the registered actions.


 

when:perform:

Register aMessageSend as action for anEventSymbol.


 

when:send:to:


 

when:send:to:with:


 

when:send:to:withArguments:


 

when:sendTo:


  filter streaming top  
 

byteEncode:


 

drawOnCanvas:


 

elementSeparator


 

encodePostscriptOn:


 

flattenOnStream:


 

fullDrawPostscriptOn:


 

printOnStream:


 

putOn:


 

storeOnStream:


 

writeOnFilterStream:


  finalization top  
 

actAsExecutor

Prepare the receiver to act as executor for any resources associated with it


 

executor

Return an object which can act as executor for finalization of the receiver


 

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.


 

retryWithGC:until:

Retry execBlock as long as testBlock returns false. Do an incremental GC after the first try, a full GC after the second try.


  flagging top  
 

isThisEverCalled


 

isThisEverCalled:

Send this message, with some useful printable argument, from methods or branches of methods which you believe are never reached. 2/5/96 sw


 

logEntry


 

logExecution


 

logExit


  logging top  
 

flag:log:

since this is now being called from other processes by project resource loading, we need something a bit more thread-safe


 

flag:streamLog:


  macpal top  
 

beep:

Make the given sound, unless the making of sound is disabled in Preferences


 

codeStrippedOut:

When a method is stripped out for external release, it is replaced by a method that calls this


 

contentsChanged


 

currentEvent

Answer the current Morphic event. This method never returns nil.


 

currentHand

Return a usable HandMorph -- the one associated with the object's current environment. This method will always return a hand, even if it has to conjure one up as a last resort. If a particular hand is actually handling events at the moment (such as a remote hand or a ghost hand), it will be returned.


 

currentVocabulary

Answer the currently-prevailing default vocabulary.


 

currentWorld

Answer a morphic world that is the current UI focus.
If in an embedded world, it's that world.
If in a morphic project, it's that project's world.
If in an mvc project, it is the topmost morphic-mvc-window's worldMorph.
If in an mvc project that has no morphic-mvc-windows, then it's just some existing worldmorph instance.
If in an mvc project in a Squeak that has NO WorldMorph instances, one is created.

This method will never return nil, it will always return its best effort at returning a relevant world morph, but if need be -- if there are no worlds anywhere, it will create a new one.


 

flash

Do nothing.


 

ifKindOf:thenDo:


 

instanceVariableValues

Answer a collection whose elements are the values of those instance variables of the receiver which were added by the receiver's class


 

isUniversalTiles

Return true if I (my world) uses universal tiles. This message can be called in places where the current World is not known, such as when writing out a project. For more information about the project-writing subtlety addressed by this protocol, kindly contact Ted Kaehler.


 

objectRepresented

most objects represent themselves; this provides a hook for aliases to grab on to


 

playSoundNamed:

Play the sound with the given name. Do nothing if this image lacks sound playing facilities.


 

refusesToAcceptCode

Answer whether the receiver is a code-bearing instrument which at the moment refuses to allow its contents to be submitted


 

scriptPerformer


 

slotInfo

Answer a list of slot-information objects. Initally only provides useful info for players


  message handling top  
 

perform:

Send the unary selector, aSymbol, to the receiver.
Fail if the number of arguments expected by the selector is not zero.
Primitive. Optional. See Object documentation whatIsAPrimitive.


 

perform:orSendTo:

If I wish to intercept and handle selector myself, do it; else send it to otherTarget


 

perform:with:

Send the selector, aSymbol, to the receiver with anObject as its argument.
Fail if the number of arguments expected by the selector is not one.
Primitive. Optional. See Object documentation whatIsAPrimitive.


 

perform:with:with:

Send the selector, aSymbol, to the receiver with the given arguments.
Fail if the number of arguments expected by the selector is not two.
Primitive. Optional. See Object documentation whatIsAPrimitive.


 

perform:with:with:with:

Send the selector, aSymbol, to the receiver with the given arguments.
Fail if the number of arguments expected by the selector is not three.
Primitive. Optional. See Object documentation whatIsAPrimitive.


 

perform:withArguments:

Send the selector, aSymbol, to the receiver with arguments in argArray.
Fail if the number of arguments expected by the selector
does not match the size of argArray.
Primitive. Optional. See Object documentation whatIsAPrimitive.


 

perform:withArguments:inSuperclass:

NOTE: This is just like perform:withArguments:, except that
the message lookup process begins, not with the receivers's class,
but with the supplied superclass instead. It will fail if lookupClass
cannot be found among the receiver's superclasses.
Primitive. Essential. See Object documentation whatIsAPrimitive.


  objects from disk top  
 

comeFullyUpOnReload:

Normally this read-in object is exactly what we want to store. 7/26/96 tk


 

convertToCurrentVersion:refStream:

subclasses should implement if they wish to convert old instances to modern ones


 

indexIfCompact


 

objectForDataStream:

Return an object to store on an external data stream.


 

readDataFrom:size:

Fill in the fields of self based on the contents of aDataStream. Return self.
Read in the instance-variables written by Object>>storeDataOn:.
NOTE: This method must send beginReference: before reading any objects from aDataStream that might reference it.
Allow aDataStream to have fewer inst vars. See SmartRefStream.


 

saveOnFile

Ask the user for a filename and save myself on a SmartReferenceStream file. Writes out the version and class structure. The file is fileIn-able. Does not file out the class of the object. tk 6/26/97 13:48


 

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.


  parts bin top  
 

descriptionForPartsBin

If the receiver is a member of a class that would like to be represented in a parts bin, answer the name by which it should be known, and a documentation string to be provided, for example, as balloon help. When the 'nativitySelector' is sent to the 'globalReceiver', it is expected that some kind of Morph will result. The parameters used in the implementation below are for documentation purposes only!


  printing top  
 

fullPrintString

Answer a String whose characters are a description of the receiver.


 

isLiteral

Answer whether the receiver has a literal text form recognized by the
compiler.


 

longPrintOn:

Append to the argument, aStream, the names and values of all
of the receiver's instance variables.


 

longPrintOn:limitedTo:indent:

Append to the argument, aStream, the names and values of all of the receiver's instance variables. Limit is the length limit for each inst var.


 

longPrintString

Answer a String whose characters are a description of the receiver.


 

nominallyUnsent:

From within the body of a method which is not formally sent within the system, but which you intend to have remain in the system (for potential manual invocation, or for documentation, or perhaps because it's sent by commented-out-code that you anticipate uncommenting out someday, send this message, with the selector itself as the argument.

This will serve two purposes:

(1) The method will not be returned by searches for unsent selectors (because it, in a manner of speaking, sends itself).
(2) You can locate all such methods by browsing senders of #nominallyUnsent:


 

printOn:

Append to the argument, aStream, a sequence of characters that
identifies the receiver.


 

printString

Answer a String whose characters are a description of the receiver.
If you want to print without a character limit, use fullPrintString.


 

printStringLimitedTo:

Answer a String whose characters are a description of the receiver.
If you want to print without a character limit, use fullPrintString.


 

propertyList

Answer a String whose characters are a property-list description of the receiver.


 

reportableSize

Answer a string that reports the size of the receiver -- useful for showing in a list view, for example


 

storeOn:

Append to the argument aStream a sequence of characters that is an
expression whose evaluation creates an object similar to the receiver.


 

storeString

Answer a String representation of the receiver from which the receiver
can be reconstructed.


 

stringForReadout


 

stringRepresentation

Answer a string that represents the receiver. For most objects this is simply its printString, but for strings themselves, it's themselves. 6/12/96 sw


  private top  
 

errorImproperStore

Create an error notification that an improper store was attempted.


 

errorNonIntegerIndex

Create an error notification that an improper object was used as an index.


 

errorNotIndexable

Create an error notification that the receiver is not indexable.


 

errorSubscriptBounds:

Create an error notification that an improper integer was used as an index.


 

primitiveError:

This method is called when the error handling results in a recursion in
calling on error: or halt or halt:.


 

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.


 

storeAt:inTempFrame:

This message had to get sent to an expression already on the stack
as a Block argument being accessed by the debugger.
Just re-route it to the temp frame.


  private-example top  

  scripting top  
 

adaptedToWorld:

If I refer to a world or a hand, return the corresponding items in the new world.


 

contentsGetz:


 

defaultFloatPrecisionFor:

Answer a number indicating the default float precision to be used in a numeric readout for which the receiver is the model.


 

evaluateUnloggedForSelf:


 

methodInterfacesForCategory:inVocabulary:limitClass:

Return a list of methodInterfaces for the receiver in the given category, given a vocabulary. aCategorySymbol is the inherent category symbol, not necessarily the wording as expressed in the vocabulary.


 

methodInterfacesForInstanceVariablesCategoryIn:

Return a collection of methodInterfaces for the instance-variables category. The vocabulary parameter, at present anyway, is not used. And for non-players, the method is at present vacuous in any case


 

methodInterfacesForScriptsCategoryIn:

Answer a list of method interfaces for the category #scripts, as seen in a viewer or other tool. The vocabulary argument is not presently used. Also, at present, only Players really do anyting interesting here.


 

selfWrittenAsIll


 

selfWrittenAsIm


 

selfWrittenAsMe


 

selfWrittenAsMy


 

selfWrittenAsThis


  scripts-kernel top  
 

universalTilesForGetterOf:

Return universal tiles for a getter on the given method interface.


 

universalTilesForInterface:

Return universal tiles for the given method interface. Record who self is.


  system primitives top  
 

asOop

Primitive. Answer a SmallInteger whose value is half of the receiver's
object pointer (interpreting object pointers as 16-bit signed quantities).
Fail if the receiver is a SmallInteger. Essential. See Object documentation
whatIsAPrimitive.


 

becomeForward:

Primitive. All variables in the entire system that used to point
to the receiver now point to the argument.
Fails if either argument is a SmallInteger.


 

className

Answer a string characterizing the receiver's class, for use in list views for example


 

creationStamp

Answer a string which reports the creation particulars of the receiver. Intended perhaps for list views, but this is presently a feature not easily accessible


 

instVarAt:

Primitive. Answer a fixed variable in an object. The numbering of the
variables corresponds to the named instance variables. Fail if the index
is not an Integer or is not the index of a fixed variable. Essential. See
Object documentation whatIsAPrimitive.


 

instVarAt:put:

Primitive. Store a value into a fixed variable in the receiver. The
numbering of the variables corresponds to the named instance variables.
Fail if the index is not an Integer or is not the index of a fixed variable.
Answer the value stored as the result. Using this message violates the
principle that each object has sovereign control over the storing of
values into its instance variables. Essential. See Object documentation
whatIsAPrimitive.


 

instVarNamed:

Return the value of the instance variable in me with that name. Slow and unclean, but very useful.


 

instVarNamed:put:

Store into the value of the instance variable in me of that name. Slow and unclean, but very useful.


 

oopString

Answer a string that represents the oop of the receiver


 

primitiveChangeClassTo:

Primitive. Change the class of the receiver into the class of the argument given that the format of the receiver matches the format of the argument's class. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have.
Note: The primitive will fail in most cases that you think might work. This is mostly because of a) the difference between compact and non-compact classes, and b) because of differences in the format. As an example, '(Array new: 3) primitiveChangeClassTo: Morph basicNew' would fail for three of the reasons mentioned above. Array is compact, Morph is not (failure #1). Array is variable and Morph is fixed (different format - failure #2). Morph is a fixed-field-only object and the array is too short (failure #3).
The facility is really provided for certain, very specific applications (mostly related to classes changing shape) and not for casual use.


 

rootStubInImageSegment:


 

someObject

Primitive. Answer the first object in the enumeration of all
objects.


 

tryNamedPrimitive

This method is a template that the Smalltalk simulator uses to
execute primitives. See Object documentation whatIsAPrimitive.


 

tryNamedPrimitive:

This method is a template that the Smalltalk simulator uses to
execute primitives. See Object documentation whatIsAPrimitive.


 

tryNamedPrimitive:with:

This method is a template that the Smalltalk simulator uses to
execute primitives. See Object documentation whatIsAPrimitive.


 

tryNamedPrimitive:with:with:

This method is a template that the Smalltalk simulator uses to
execute primitives. See Object documentation whatIsAPrimitive.


 

tryNamedPrimitive:with:with:with:

This method is a template that the Smalltalk simulator uses to
execute primitives. See Object documentation whatIsAPrimitive.


 

tryNamedPrimitive:with:with:with:with:

This method is a template that the Smalltalk simulator uses to
execute primitives. See Object documentation whatIsAPrimitive.


 

tryNamedPrimitive:with:with:with:with:with:

This method is a template that the Smalltalk simulator uses to
execute primitives. See Object documentation whatIsAPrimitive.


 

tryNamedPrimitive:with:with:with:with:with:with:

This method is a template that the Smalltalk simulator uses to
execute primitives. See Object documentation whatIsAPrimitive.


 

tryNamedPrimitive:with:with:with:with:with:with:with:

This method is a template that the Smalltalk simulator uses to
execute primitives. See Object documentation whatIsAPrimitive.


 

tryPrimitive:withArgs:

This method is a template that the Smalltalk simulator uses to
execute primitives. See Object documentation whatIsAPrimitive.


  testing top  
 

basicType

Answer a symbol representing the inherent type of the receiver


 

beViewed

Open up a viewer on the receiver. The Presenter is invited to decide just how to present this viewer


 

costumes

Answer a list of costumes associated with the receiver. The appearance of this method in class Object serves only as a backstop, probably only transitionally


 

haltIfNil


 

haveFullProtocolBrowsed

Open up a Lexicon on the receiver


 

haveFullProtocolBrowsedShowingSelector:

Open up a Lexicon on the receiver, having it open up showing aSelector, which may be nil


 

isBehavior

Return true if the receiver is a behavior.
Note: Do not override in any class except behavior.


 

isCollection

Return true if the receiver is some sort of Collection and responds to basic collection messages such as #size and #do:


 

isColor

Answer true if receiver is a Color. False by default.


 

isFloat

Overridden to return true in Float, natch


 

isForm


 

isFraction

Answer true if the receiver is a Fraction.


 

isInteger

Overridden to return true in Integer.


 

isMorph


 

isMorphicEvent


 

isNumber

Overridden to return true in Number, natch


 

isPoint

Overridden to return true in Point.


 

isPseudoContext


 

isStream

Return true if the receiver responds to the stream protocol


 

isString

Overridden to return true in String, natch


 

isText


 

isTransparent


 

isVariableBinding

Return true if I represent a literal variable binding


 

isWebBrowser

whether this object is a web browser. See class: Scamper


 

knownName

If a formal name has been handed out for this object, answer it, else nil


 

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..


 

nameForViewer

Answer a name to be shown in a Viewer that is viewing the receiver


 

notNil

Coerces nil to false and everything else to true.


 

openInstanceBrowserWithTiles

Open up an instance browser on me with tiles as the code type, and with the search level as desired.


 

showDiffs

Answer whether the receiver, serving as the model of a text-bearing entity, is 'showing differences' -- if it is, the editor may wish to show special feedback


 

stepAt:in:


 

stepIn:


 

stepTime


 

stepTimeIn:


 

vocabularyDemanded

Answer a vocabulary that the receiver insists be used when it is looked at in a Viewer. This allows specific classes to insist on specific custom vocabularies


 

wantsDiffFeedback

Answer whether the receiver, serving as the model of a text-bearing entity, would like for 'diffs' green pane-border feedback to be shown


 

wantsSteps

Overridden by morphic classes whose instances want to be stepped,
or by model classes who want their morphic views to be stepped.


 

wantsStepsIn:


  translation support top  
 

asIf:var:


 

asIf:var:asValue:


 

asIf:var:put:


 

asOop:


 

asSmallIntegerObj


 

asValue:


 

cCode:

For translation only; noop when running in Smalltalk.


 

cCode:inSmalltalk:

Support for Smalltalk-to-C translation. The given string is output literally when generating C code. If this code is being simulated in Smalltalk, answer the result of evaluating the given block.


 

cCoerce:to:

Type coercion for translation only; just return the value when running in Smalltalk.


 

export:

For translation only; noop when running in Smalltalk.


 

inline:

For translation only; noop when running in Smalltalk.


 

primitive:parameters:receiver:


 

remapOop:in:

For translation only; noop when running in Smalltalk.


 

returnTypeC:

For translation only; noop when running in Smalltalk.


 

sharedCodeNamed:inCase:

For translation only; noop when running in Smalltalk.


 

stAt:


 

stAt:put:


 

stSize


 

static:

For translation only; noop when running in Smalltalk.


 

suppressFailureGuards:

For translation only; noop when running in Smalltalk.


 

var:declareC:

For translation only; noop when running in Smalltalk.


 

var:type:

For translation only; noop when running in Smalltalk.


 

var:type:array:

For translation only; noop when running in Smalltalk.


  undo top  
 

capturedState

May be overridden in subclasses.


 

commandHistory

Return the command history for the receiver


 

purgeAllCommands

Purge all commands for this object


 

redoFromCapturedState:

May be overridden in subclasses. See also capturedState


 

refineRedoTarget:selector:arguments:in:

Any object can override this method to refine its redo specification


 

refineUndoTarget:selector:arguments:in:

Any object can override this method to refine its undo specification


 

rememberCommand:

Remember the given command for undo


 

rememberUndoableAction:named:


 

undoFromCapturedState:

May be overridden in subclasses. See also capturedState


  updating top  
 

changed

Receiver changed in a general way; inform all the dependents by
sending each dependent an update: message.


 

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.


 

handledListVerification

When a self-updating PluggableListMorph lazily checks to see the state of affairs, it first gives its model an opportunity to handle the list verification itself (this is appropriate for some models, such as VersionsBrowser); if a list's model has indeed handled things itself, it returns true here


 

noteSelectionIndex:for:

backstop


 

okToChange

Allows a controller to ask this of any model


 

update:

Receive a change notice from an object of whom the receiver is a
dependent. The default behavior is to do nothing; a subclass might want
to change itself in some way.


 

updateListsAndCodeIn:


 

windowIsClosing

This message is used to inform a models that its window is closing. Most models do nothing, but some, such as the Debugger, must do some cleanup. Note that this mechanism must be used with care by models that support multiple views, since one view may be closed while others left open.


  user interface top  
 

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.


 

addModelMenuItemsTo:forMorph:hand:

The receiver serves as the model for aMorph; a menu is being constructed for the morph, and here the receiver is able to add its own items


 

asExplorerString


 

basicInspect

Create and schedule an Inspector in which the user can examine the
receiver's variables. This method should not be overriden.


 

beep

Make a beep sound. Every object would like to be able to speak. 6/10/96 sw


 

browseHierarchy


 

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


 

defaultLabelForInspector

Answer the default label to be used for an Inspector window on the receiver.


 

eToyStreamedRepresentationNotifying:


 

explore


 

fullScreenSize

Answer the size to which a window displaying the receiver should be set


 

hasContentsInExplorer


 

inform:

Display a message for the user to read and then dismiss. 6/9/96 sw


 

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


 

inspect

Create and schedule an Inspector in which the user can examine the receiver's variables.


 

inspectWithLabel:


 

launchPartVia:

Obtain a morph by sending aSelector to self, and attach it to the morphic hand. This provides a general protocol for parts bins


 

launchTileToRefer

Create a tile to reference the receiver, and attach it to the hand


 

modelSleep

A window with me as model is being exited or collapsed or closed.
Default response is no-op


 

modelWakeUp

A window with me as model is being entered or expanded. Default response is no-op


 

modelWakeUpIn:

A window with me as model is being entered or expanded. Default response is no-op


 

mouseUpBalk:

A button I own got a mouseDown, but the user moved out before letting up. Certain kinds of objects (so-called 'radio buttons', for example, and other structures that must always have some selection, e.g. PaintBoxMorph) wish to take special action in this case; this default does nothing.


 

newTileMorphRepresentative


 

notYetImplemented


 

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.


  viewer top  
 

assureUniClass

If the receiver is not yet an instance of a uniclass, create a uniclass for it and make the receiver become an instance of that class.


 

belongsToUniClass

Answer whether the receiver belongs to a uniclass. For the moment (this is not entirely satisfactory) this is precisely equated with the classname ending in a digit


 

browseOwnClassSubProtocol

Open up a ProtocolBrowser on the subprotocol of the receiver


 

categoriesForViewer:

Answer a list of categories to offer in the given viewer


 

categoriesForVocabulary:limitClass:

Answer a list of categories of methods for the receiver when using the given vocabulary, given that one considers only methods that are implemented not further away than aLimitClass


 

categoryElementsFor:

Just a start. Answer a list of tuples that characterize the elements in the given category. Every class in the receiver's superclass chain which implements #additionsToViewerCategories is given the chance to add elements to the category. In this first version, only methods with 0 or 1 arguments are included, because of the limitations of PhraseTileMorphs. Later, the entire method vocabulary of a category will be incorporated, and we will use type hints for the arguments, and we will support a way that methods with return-value types can have type-appropriate readouts for their values, etc.


 

chooseNewNameForReference

Offer an opportunity for the receiver, presumed already to be known in the References registry, to be renamed


 

defaultLimitClassForVocabulary:

Answer the class to use, by default, as the limit class on a protocol browser or viewer opened up on the receiver, within the purview of the Vocabulary provided


 

defaultNameStemForInstances

Answer a basis for names of default instances of the receiver. The default is to let the class specify, but certain instances will want to override. (PasteUpMorphs serving as Worlds come to mind


 

elementTypeFor:vocabulary:

Answer a symbol characterizing what kind of element aStringOrSymbol represents. Realistically, at present, this always just returns #systemScript; a prototyped but not-incorporated architecture supported use of a leading colon to characterize an inst var of a system class, and for the moment we still see its remnant here.


 

externalName

Answer an external name by which the receiver is known. Generic implementation here is a transitional backstop. probably


 

graphicForViewerTab

When a Viewer is open on the receiver, its tab needs some graphic to show to the user. Answer a form or a morph to serve that purpose. A generic image is used for arbitrary objects, but note my reimplementors


 

hasUserDefinedSlots

Answer whether the receiver has any user-defined slots, in the omniuser sense of the term. This is needed to allow Viewers to look at any object, not just at Players.


 

infoFor:inViewer:

The user made a gesture asking for info/menu relating to me. Some of the messages dispatched here are not yet available in this image


 

initialTypeForSlotNamed:

Answer the initial type to be ascribed to the given instance variable


 

isPlayerLike

Return true if the receiver is a player-like object


 

methodInterfacesInPresentationOrderFrom:forCategory:

Answer the interface list sorted in desired presentation order, using a static master-ordering list, q.v. The category parameter allows an escape in case one wants to apply different order strategies in different categories, but for now a single master-priority-ordering is used -- see the comment in method EToyVocabulary.masterOrderingOfPhraseSymbols


 

newScriptorAround:

Sprout a scriptor around aPhraseTileMorph, thus making a new script. This is where generalized scriptors will be threaded in


 

offerViewerMenuFor:event:

Offer the primary Viewer menu to the user. Copied up from Player code, but most of the functions suggested here don't work for non-Player objects, many aren't even defined, some relate to exploratory sw work not yet reflected in the current corpus. We are early in the life cycle of this method...


 

offerViewerMenuForEvt:morph:

Offer the viewer's primary menu to the user. aMorph is some morph within the viewer itself, the one within which a mousedown triggered the need for this menu, and it is used only to retrieve the Viewer itself


 

renameScript:

prompt the user for a new selector and apply it. Presently only works for players


 

tilePhrasesForCategory:inViewer:

Return a collection of phrases for the category. If using classic tiles, only include phrases that have fewer than two arguments, because all that they can handle.


 

tileToRefer

Answer a reference tile that comprises an alias to me


 

uniqueInstanceVariableNameLike:excluding:

Answer a nice instance-variable name to be added to the receiver which resembles aString, making sure it does not coincide with any element in takenNames


 

uniqueNameForReference

Answer a nice name by which the receiver can be referred to by other objects. At present this uses a global References dictionary to hold the database of references, but in due course this will need to acquire some locality


 

uniqueNameForReferenceOrNil

If the receiver has a unique name for reference, return it here, else return nil


 

updateThresholdForGraphicInViewerTab

When a Viewer is open on the receiver, its tab needs some graphic to show to the user. Computing this graphic can take quite some time so we want to make the update frequency depending on how long it takes to compute the thumbnail. The threshold returned by this method defines that the viewer will update at most every 'threshold * timeItTakesToDraw' milliseconds. Thus, if the time for computing the receiver's thumbnail is 200 msecs and the the threshold is 10, the viewer will update at most every two seconds.


 

usableMethodInterfacesIn:

Filter aList, returning a subset list of apt phrases


 

usablePhraseSpecsIn:

Filter aList, returning a subset list of apt phrases


  world hacking top  
 

couldOpenInMorphic

is there an obvious morphic world in which to open a new morph?


class methods
  class initialization top  
 

flushDependents


 

flushEvents

Object flushEvents


 

initialize

Object initialize


 

initializeDependentsFields

Object initialize


 

initializeEventsFields

Object initialize


 

reInitializeDependentsFields

Object reInitializeDependentsFields


 

reInitializeEventsFields

Object reInitializeEventsFields


  documentation top  
 

howToModifyPrimitives

You are allowed to write methods which specify primitives, but please use
caution. If you make a subclass of a class which contains a primitive method,
the subclass inherits the primitive. The message which is implemented
primitively may be overridden in the subclass (E.g., see at:put: in String's
subclass Symbol). The primitive behavior can be invoked using super (see
Symbol string:).

A class which attempts to mimic the behavior of another class without being
its subclass may or may not be able to use the primitives of the original class.
In general, if the instance variables read or written by a primitive have the
same meanings and are in the same fields in both classes, the primitive will
work.

For certain frequently used 'special selectors', the compiler emits a
send-special-selector bytecode instead of a send-message bytecode.
Special selectors were created because they offer two advantages. Code
which sends special selectors compiles into fewer bytes than normal. For
some pairs of receiver classes and special selectors, the interpreter jumps
directly to a primitive routine without looking up the method in the class.
This is much faster than a normal message lookup.

A selector which is a special selector solely in order to save space has a
normal behavior. Methods whose selectors are special in order to
gain speed contain the comment, 'No Lookup'. When the interpreter
encounters a send-special-selector bytecode, it checks the class of the
receiver and the selector. If the class-selector pair is a no-lookup pair,
then the interpreter swiftly jumps to the routine which implements the
corresponding primitive. (A special selector whose receiver is not of the
right class to make a no-lookup pair, is looked up normally). The pairs are
listed below. No-lookup methods contain a primitive number specification,
<primitive: xx>, which is redundant. Since the method is not normally looked
up, deleting the primitive number specification cannot prevent this
primitive from running. If a no-lookup primitive fails, the method is looked
up normally, and the expressions in it are executed.

No Lookup pairs of (class, selector)

SmallInteger with any of + - * / \\ bitOr: bitShift: bitAnd: //
SmallInteger with any of = ~= > < >= <=
Any class with ==
Any class with @
Point with either of x y
ContextPart with blockCopy:
BlockContext with either of value value:


 

whatIsAPrimitive

Some messages in the system are responded to primitively. A primitive
response is performed directly by the interpreter rather than by evaluating
expressions in a method. The methods for these messages indicate the
presence of a primitive response by including <primitive: xx> before the
first expression in the method.

Primitives exist for several reasons. Certain basic or 'primitive'
operations cannot be performed in any other way. Smalltalk without
primitives can move values from one variable to another, but cannot add two
SmallIntegers together. Many methods for arithmetic and comparison
between numbers are primitives. Some primitives allow Smalltalk to
communicate with I/O devices such as the disk, the display, and the keyboard.
Some primitives exist only to make the system run faster; each does the same
thing as a certain Smalltalk method, and its implementation as a primitive is
optional.

When the Smalltalk interpreter begins to execute a method which specifies a
primitive response, it tries to perform the primitive action and to return a
result. If the routine in the interpreter for this primitive is successful,
it will return a value and the expressions in the method will not be evaluated.
If the primitive routine is not successful, the primitive 'fails', and the
Smalltalk expressions in the method are executed instead. These
expressions are evaluated as though the primitive routine had not been
called.

The Smalltalk code that is evaluated when a primitive fails usually
anticipates why that primitive might fail. If the primitive is optional, the
expressions in the method do exactly what the primitive would have done (See
Number @). If the primitive only works on certain classes of arguments, the
Smalltalk code tries to coerce the argument or appeals to a superclass to find
a more general way of doing the operation (see SmallInteger +). If the
primitive is never supposed to fail, the expressions signal an error (see
SmallInteger asFloat).

Each method that specifies a primitive has a comment in it. If the primitive is
optional, the comment will say 'Optional'. An optional primitive that is not
implemented always fails, and the Smalltalk expressions do the work
instead.

If a primitive is not optional, the comment will say, 'Essential'. Some
methods will have the comment, 'No Lookup'. See Object
howToModifyPrimitives for an explanation of special selectors which are
not looked up.

For the primitives for +, -, *, and bitShift: in SmallInteger, and truncated
in Float, the primitive constructs and returns a 16-bit
LargePositiveInteger when the result warrants it. Returning 16-bit
LargePositiveIntegers from these primitives instead of failing is
optional in the same sense that the LargePositiveInteger arithmetic
primitives are optional. The comments in the SmallInteger primitives say,
'Fails if result is not a SmallInteger', even though the implementor has the
option to construct a LargePositiveInteger. For further information on
primitives, see the 'Primitive Methods' part of the chapter on the formal
specification of the interpreter in the Smalltalk book.


  instance creation top  
 

categoryForUniclasses

Answer the category into which to place unique-class instances


 

chooseUniqueClassName


 

initialInstance

Answer the first instance of the receiver, generate an error if there is one already


 

initializedInstance

Answer an instance of the receiver which in some sense is initialized. In the case of Morphs, this will yield an instance that can be attached to the Hand after having received the same kind of basic initialization that would be obtained from an instance chosen from the 'new morph' menu. Return nil if the receiver is reluctant for some reason to return such a thing


 

instanceOfUniqueClass

Answer an instance of a unique subclass of the receiver


 

instanceOfUniqueClassWithInstVarString:andClassInstVarString:

Create a unique class for the receiver, and answer an instance of it


 

isUniClass

Answer whether the receiver is a uniclass.


 

newFrom:

Create an object that has similar contents to aSimilarObject.
If the classes have any instance varaibles with the same names, copy them across.
If this is bad for a class, override this method.


 

newUniqueClassInstVars:classInstVars:

Create a unique class for the receiver


 

newUserInstance

Answer an instance of an appropriate class to serve as a user object in the containment hierarchy


 

readCarefullyFrom:

Create an object based on the contents of textOrString. Return an error instead of putting up a SyntaxError window.


 

readFrom:

Create an object based on the contents of aStream.


  objects from disk top  
 

createFrom:size:version:

Create an instance of me so objects on the disk can be read in. Tricky part is computing the size if variable. Inst vars will be filled in later.


  plugin generation top  
 

ccg:emitLoadFor:from:on:


 

ccg:generateCoerceToOopFrom:on:


 

ccg:generateCoerceToValueFrom:on:


 

ccg:prolog:expr:index:


 

ccgCanConvertFrom:


 

ccgDeclareCForVar:


  private top  
 

releaseExternalSettings

Do nothing as a default