|
|
Class: Object
nil
|
+--Object
|
+-- ... almost every other class ...
- Package:
- stx:libbasic
- Category:
- Kernel-Objects
- Version:
- rev:
1.650
date: 2010/04/07 14:33:48
- user: cg
- file: Object.st directory: libbasic
- module: stx stc-classLibrary: libbasic
- Author:
- Claus Gittinger
Object is the superclass of most other classes.
(except for nil-subclasses, which inherit nothing,
to catch any message into their #doesNotUnderstand: method)
Protocol which is common to every object is defined here.
Also some utility stuff (like notify) and error handling is implemented here.
Object has no instance variables (and may not get any added). One reason is, that
UndefinedObject and SmallInteger are also inheriting from Object - these two cannot
have instance variables (due to their implementation).
The other reason is that the runtime system (VM) knows about the layout of some built-in
classes (think of Class, Method, Block and also Integer or Float).
If you were allowed to add instance variables to Object, the VM had to be recompiled
(and also rewritten in some places).
[Class variables:]
ErrorSignal <Signal> Signal raised for error/error: messages
also, parent of all other signals.
HaltSignal <Signal> Signal raised for halt/halt: messages
MessageNotUnderstoodSignal Signals raised for various error conditions
UserInterruptSignal
RecursionInterruptSignal
ExceptionInterruptSignal
SubscriptOutOfBoundsSignal
NonIntegerIndexSignal
NotFoundSignal
KeyNotFoundSignal
ElementOutOfBoundsSignal
InformationSignal
WarningSignal
DeepCopyErrorSignal
InternalErrorSignal
AbortSignal <Signal> Signal raised by debugger, to abort a computation
BUT, the debugger will only raise it if it is handled.
By handling the abortSignal, you can control where the
debuggers abort-function resumes execution in case of
an error.
ErrorRecursion <Boolean> controls behavior when recursive errors occur (i.e.
an error while handling an error).
Dependencies <WeakDependencyDictionary>
keeps track of object dependencies.
InfoPrinting <Boolean> controls weather informational messages
are printed.
ActivityNotificationSignal <QuerySignal>
raised on #activityNotification:
NonWeakDependencies <Dictionary> keeps track of object dependencies.
Dependents stay alive.
SynchronizationSemaphores <WeakIdentityDictionary>
Semaphores for per-object-monitor.
Compatibility-ST80
-
rootError
-
return the signal used for error/error: - handling.
Same as errorSignal for ST80 compatibility.
Signal constants
-
abortAllSignal
-
return the signal used to abort user actions (much like AbortSignal).
This signal is supposed to abort multiple operation actions, and get out of
the loop (such as when confirming multiple class deletions etc.)
-
abortSignal
-
return the signal used to abort user actions. This signal is only
raised if caught (by the debugger), and will lead way out of the
currently active doIt/printIt or inspectIt. (also some others use
this for a save abort)
-
activityNotificationSignal
-
return the signal used for activity notifications.
A handler for this signal gets all #activityNotification: sends
-
conversionErrorSignal
-
return the signal used for conversion error handling
-
deepCopyErrorSignal
-
return the signal raised when a deepcopy is asked for
an object which cannot do this (for example, BlockClosures
or Contexts).
-
elementOutOfBoundsSignal
-
return the signal used for element error reporting
(this signal is used for example when a value not in 0..255 is to
be put into a bytearray)
-
errorSignal
-
return the signal used for error/error: - handling
-
haltSignal
-
return the signal used for halt/halt: - handling
-
indexNotFoundSignal
-
return the signal used for bad index error reporting.
This is also the parentSignal of the nonIntegerIndex- and
subscriptOutOfBoundsSignal
-
informationSignal
-
return the signal used for informations.
A handler for this signal gets all #information: sends
-
internalErrorSignal
-
return the signal used to report internal (VM-) errors.
-
keyNotFoundSignal
-
return the signal used for no such key error reporting
-
messageNotUnderstoodSignal
-
return the signal used for doesNotUnderstand: - error handling
-
nonIntegerIndexSignal
-
return the signal used for bad subscript error reporting
-
notFoundSignal
-
return the signal used for no element found error reporting
-
notifySignal
-
return the parent of all notification signals.
-
osSignalInterruptSignal
-
return the signal used for OS-signal error reporting;
This is only raised if handled - otherwise, a debugger is entered.
-
primitiveFailureSignal
-
return the signal used for primitiveFailed - error handling
-
privateMethodSignal
-
return the signal used for privateMethod - error handling
-
recursionInterruptSignal
-
return the signal used for recursion overflow error handling
-
recursiveStoreStringSignal
-
return the notification used to report storeString generation of recursive objects
-
subclassResponsibilitySignal
-
return the signal used for subclassResponsibility error reporting.
(this signal is used to signal incomplete subclasses - i.e. a programmers error)
-
subscriptOutOfBoundsSignal
-
return the signal used for subscript error reporting.
(this signal is used for example when an array is accessed with an
index less than 1 or greater than the array size)
-
userInterruptSignal
-
return the signal used for ^C interrupts handling
-
userNotificationSignal
-
the parent signal used with information and warnings.
Handling this allows handling of both information- and warning notifications.
-
warningSignal
-
return the signal used for warnings.
A handler for this signal gets all #warn: sends
info messages
-
infoPrinting
-
return the flag which controls information messages.
-
infoPrinting: aBoolean
-
turn on/off printing of information messages.
If the argument, aBoolean is false, infoPrint will not output
messages. The default is true.
initialization
-
initSignals
-
called only once - initialize signals
-
initialize
-
called only once - initialize signals
queries
-
isAbstract
-
Return if this class is an abstract class.
True is returned for Object here; false for subclasses.
Abstract subclasses must redefine again.
-
isBuiltInClass
-
return true, if this class is known by the run-time-system,
i.e. you cannot add/remove instance variables without recompiling
the VM.
Here, true is returned for myself, false for subclasses.
Compatibility - Squeak
-
caseError
-
Report an error from an in-line or explicit case statement.
-
caseOf: aBlockAssociationCollection
-
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: aBlockAssociationCollection otherwise: aBlock
-
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.
Compatibility-Dolphin
-
stbFixup: anSTBInFiler at: newObjectIndex
-
Answer the true object that must be used to represent the receiver when read from anSTBInFiler.
Typically this is overridden by subclasses of STBProxy to answer the proxied object. Other classes
may also override this method to effectively 'one way become' the receiver to some other object
-
trigger: anAspect
-
-
trigger: anAspect with: anArgument
-
-
when: anAspect sendTo: anObject
-
Compatibility-ST/V
-
triggerEvent: aSymbol
-
Compatibility-ST80
-
isMetaclass
-
Compatibility-Squeak
-
asString
-
-
becomeForward: anotherObject
-
-
becomeForward: anotherObject copyHash: copyHash
-
-
clone
-
-
copyTwoLevel
-
one more level than a shallowCopy
-
explore
-
-
inform: aString
-
Display a message for the user to read and then dismiss.
-
isInMemory
-
All normal objects are.
-
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
-
valueWithPossibleArguments: argArray
-
-
veryDeepCopy
-
Compatibility-VW
-
isCharacters
-
added for visual works compatibility
-
keyNotFoundError: aKey
-
VW compatibility
-
oneWayBecome: anotherObject
-
Javascript support
-
typeof
-
return a string describing what I am
accessing
-
at: index
-
return the indexed instance variable with index, anInteger;
this method can be redefined in subclasses.
-
at: index put: anObject
-
store the 2nd arg, anObject as indexed instvar with index, anInteger.
this method can be redefined in subclasses. Returns anObject (sigh)
-
basicAt: index
-
return the indexed instance variable with index, anInteger.
Trigger an error if the receiver has no indexed instance variables.
This method should NOT be redefined in any subclass (except with great care, for tuning)
-
basicAt: index put: anObject
-
store the 2nd arg, anObject as indexed instvar with index, anInteger.
Returns anObject (sigh).
Trigger an error if the receiver has no indexed instance variables.
This method should NOT be redefined in any subclass (except with great care, for tuning)
-
byteAt: index
-
return the byte at index.
This is only allowed for non-pointer indexed objects
(i.e. byteArrays, wordArrays, floatArrays etc.).
The receivers indexed instvars are treated as an uninterpreted
collection of bytes.
Only useful with binary storage.
-
byteAt: index put: byteValue
-
set the byte at index.
This is only allowed for non-pointer indexed objects
(i.e. byteArrays, wordArrays, floatArrays etc.).
The receivers indexed instvars are treated as an uninterpreted
collection of bytes.
Only useful with binary storage.
-
instVarAt: index
-
return a non-indexed instance variable;
peeking into an object this way is not very object oriented
- use with care (needed for copy, inspector etc.)
-
instVarAt: index put: value
-
change a non-indexed instance variable;
peeking into an object this way is not very object oriented
- use with care (needed for copy, inspector etc.)
-
instVarNamed: name
-
return a non-indexed instance variables value by name;
peeking into an object this way is not very object oriented
- use with care if at all (provided for inspectors and memory usage monitor).
Notice, this access is very slow (because the classes instVar-description has to be
parsed ad runtime)
-
instVarNamed: name ifAbsent: exceptionBlock
-
return a non-indexed instance variables value by name,
or the value of exceptionBlock, if there is no such instance variable.
peeking into an object this way is not very object oriented
- use with care if at all (provided for inspectors and memory usage monitor).
Notice, this access is very slow (because the classes instVar-description has to be
parsed ad runtime)
-
instVarNamed: name put: value
-
set a non-indexed instance variable by name;
peeking into an object this way is not very object oriented
- if at all, use with care (provided for protocol completeness).
Notice, this access is very slow (because the classes instVar-description has to be
parsed ad runtime)
-
instVarNamed: name put: anObject ifAbsent: exceptionBlock
-
return a non-indexed instance variables value by name,
or the value of exceptionBlock, if there is no such instance variable.
peeking into an object this way is not very object oriented
- use with care if at all (provided for inspectors and memory usage monitor).
Notice, this access is very slow (because the classes instVar-description has to be
parsed ad runtime)
attributes access
-
objectAttributeAt: attributeKey
-
return the attribute for a given key or nil if not found
-
objectAttributeAt: attributeKey put: anObject
-
store the attribute anObject referenced by key into the receiver
-
objectAttributes
-
return a Collection of attributes - nil if there is none.
The default implementation here uses a global WeakDictionary to store
attributes
This may be too slow for high frequency slot access,
therefore, some classes may redefine this for better performance.
Notice the mentioning of a WeakDictionary - read the classes documentation.
-
objectAttributes: aCollection
-
set the collection of attributes.
The default implementation here uses a global Dictionary to store
attributes which may be too slow for high frequency change&update.
Therefore, some classes may redefine this for better performance.
-
removeObjectAttribute: attributeKey
-
make the argument, anObject be no attribute of the receiver
binary storage
-
binaryStoreBytes
-
store byself into a new byteArray and return it.
A copy of the receiver can be reconstructing by sending
#fromBinaryStoreBytes: to my class (or superclass)
-
hasSpecialBinaryRepresentation
-
return true, if the receiver has a special binary representation;
default here is false, but can be redefined in class which provide
their own storeBinary/readBinary methods.
Normal user classes should not use this, it is meant as a hook for
special classes such as True, False, UndefinedObject or SmallInteger.
If your instances should be stored in a special way, see
#representBinaryOn: and #readBinaryContentsFromdata:manager:.
-
readBinaryContentsFrom: stream manager: manager
-
reconstruct the receivers instance variables by reading a binary
binary representation from stream.
This is a general implementation, walking over instances
and loading each recursively using manager.
Redefined by some classes to read a more compact representations
(see String, SmallInteger etc).
Notice, that the object is already recreated as an empty corps
with instance variables all nil and bit-instances (bytes, words etc.)
already read and restored.
Also notice: this method is not called, if a private representation
has been stored (see representBinaryOn:).
In that case, #readBinaryContentsFromData:manager: is called, which
has to be reimplemented in the objects class.
-
readBinaryContentsFromData: instVarArray manager: manager
-
this is only needed if instances want to use a special binary representation
as specified by redefining representBinaryOn:manager.
Must reconstruct the receiver's instance variables by filling instance
variables with values from instVarArray. This array contains the instvars
as specified in #representBinaryOn: when the object was stored.
It is the receivers responsibility to set its instance variables in the
same order from that array.
-
representBinaryOn: manager
-
this method is called by the storage manager to ask objects
if they wish to provide their own binary representation.
If they want to do so, they should return an array containing all
instance variables (named & indexed pointer) to be stored.
If not redefined, this method returns nil which means that all
instance variables are to be stored.
It should be redefined in objects which do not want all instance variables
to be stored (for example: objects which keep references to a view etc.).
If this is redefined returning non-nil, the corresponding class needs
a redefined instance method named #readBinaryContentsFromData:manager:
which has to fill the receivers named (and optionally indexed pointer)
instance variables with corresponding values from a data array.
-
storeBinaryDefinitionBodyOn: stream manager: manager
-
append a binary representation of the receivers body onto stream.
This is a general implementation walking over instances storing
each recursively as an ID using manager.
Can be redefined in subclasses.
-
storeBinaryDefinitionOn: stream manager: manager
-
append a binary representation of the receiver onto stream.
This is an internal interface for binary storage mechanism.
This method first stores the class, then the body, which is done
in a separate method to allow redefinition of the bodies format.
Can be redefined in subclasses to write more compact representations
(see String, SmallInteger etc).
-
storeBinaryOn: aStreamOrFilename
-
Writes a description of the receiver onto aStreamOrFilename, in a way that allows
the object's structure to be reconstructed from the stream's contents
-
storeBinaryOn: stream manager: manager
-
append a binary representation of the receiver onto stream.
change & update
-
broadcast: aSelectorSymbol
-
send a message with selector aSelectorSymbol to all my dependents
-
broadcast: aSelectorSymbol with: anArgument
-
send a message with selector aSelectorSymbol with an additional
argument anArgument to all my dependents.
-
changeRequest
-
the receiver wants to change - check if all dependents
grant the request, and return true if so
-
changeRequest: aSymbol
-
the receiver wants to change - check if all dependents
grant the request, and return true if so
-
changeRequest: aSymbol from: anObject
-
the receiver wants to change - check if all dependents
except anObject grant the request, and return true if so.
The argument anObject is typically going to be the one who is
about to send the change request.
-
changeRequest: aSymbol with: aParameter
-
the receiver wants to change - check if all dependents
grant the request, and return true if so
-
changeRequest: aSymbol with: aParameter from: anObject
-
the receiver wants to change - check if all dependents
except anObject grant the request, and return true if so.
The argument anObject is typically going to be the one who is
about to send the change request.
-
changeRequestFrom: anObject
-
the receiver wants to change - check if all dependents
except anObject grant the request, and return true if so.
The argument anObject is typically going to be the one who is
about to send the change request.
-
changed
-
notify all dependents that the receiver has changed.
Each dependent gets a '#update:'-message with the original
receiver as argument.
-
changed: aParameter
-
notify all dependents that the receiver has changed somehow.
Each dependent gets a '#update:'-message with aParameter
as argument.
-
changed: aParameter with: anArgument
-
notify all dependents that the receiver has changed somehow.
Each dependent gets a '#update:with:from:'-message, with aParameter
and anArgument as arguments.
-
update: aParameter
-
the message is sent to a dependent, when one of the objects
on whom the receiver depends, has changed. The argument aParameter
is either the changed object or the argument to the #changed: message.
Default behavior here is to do nothing
-
update: aParameter with: anArgument
-
dependent is notified of some change -
Default is to try update:
-
update: aParameter with: anArgument from: sender
-
dependent is notified of some change -
Default is to try update:with:
-
updateRequest
-
return true, if an update request is granted.
Default here is to grant updates - may be used
to lock updates if someone is making other changes
from within an update. Or if someone has locked its
state and does not want others to change things.
However, these dependents must all honor the
changeRequest - ifTrue - change protocol. I.e. they
must first ask all others via changeRequest, and only do the change
it returns true. The others must decide in updateRequest and
return true if they think a change is ok.
-
updateRequest: aSymbol
-
return true, if an update request is granted.
Default here a simple updateRequest
-
updateRequest: aSymbol with: aParameter
-
return true, if an update request is granted.
Default here a simple updateRequest
-
updateRequest: aSymbol with: aParameter from: sender
-
return true, if an update request is granted.
Default here a simple updateRequest
-
withoutUpdating: someone do: aBlock
-
evaluate a block but remove someone from my dependents temporarily
cleanup
-
lowSpaceCleanup
-
ignored here - redefined in some classes to
cleanup in low-memory situations
comanche
-
asHtmlDocumentForRequest: aNetworkRequest
-
-
asHtmlElement
-
answer my HTML representation (String),
as I would look like inside an HTML document
-
asHtmlElementIn: htmlContainer
-
answer my HTML representation (String),
as I would look like inside htmlContainer
-
asHttpResponseTo: anHttpRequest
-
-
comancheUrl
-
-
makeAvailableInComanche
-
force putting the object on the ObjUrlMap list
-
mimeType
-
comparing
-
= anObject
-
return true, if the receiver and the arg have the same structure.
Notice:
This method is partially open coded (inlined) by the compiler(s)
identical objects are always considered equal.
redefining it may not work as expected.
-
== anObject
-
return true, if the receiver and the arg are the same object.
Never redefine this in any class.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
-
deepSameContentsAs: anObject
-
return true, if the receiver and the arg have the same contents
in both the named instance vars and any indexed instVars.
This method descends into referenced objects, where #sameContentsAs: does not descend
-
hash
-
return an Integer useful as a hash key for the receiver.
This hash should return same values for objects with same
contents (i.e. use this to hash on structure)
-
identityHash
-
return an Integer useful as a hash key for the receiver.
This hash should return same values for the same object (i.e. use
this to hash on identity of objects).
We cannot use the Objects address (as other smalltalks do) since
no object-table exists and the hashval must not change when objects
are moved by the collector. Therefore we assign each object a unique
Id in the object header itself as its hashed upon.
(luckily we have 11 bits spare to do this - unluckily its only 11 bits).
Time will show, if 11 bits are enough; if not, another entry in the
object header will be needed, adding 4 bytes to every object. Alternatively,
hashed-upon objects could add an instvar containing the hash value.
-
identityHashForBinaryStore
-
hash which is usable if the object does not change its class
and does not #become something else, while the hash is used.
This is only used by the binary storage mechanism, during the
object writing phase.
-
sameContentsAs: anObject
-
return true, if the receiver and the arg have the same contents
in both the named instance vars and any indexed instVars.
The code here only checks if values present in the receiver are also
present in the arg, not vice versa.
I.e. the argument may be bigger and/or have more instance variables.
-
~= anObject
-
return true, if the receiver and the arg do not have the same structure.
Notice:
This method is partially open coded (inlined) by the compiler(s)
identical objects are never considered unequal.
redefining it may not work as expected.
-
~~ anObject
-
return true, if the receiver and the arg are not the same object.
Never redefine this in any class.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
converting
-
-> anObject
-
return an association with the receiver as key and
the argument as value
-
as: aSimilarClass
-
If the receivers class is not aSimilarClass,
create and return an object of class aSimilarClass that has the same contents
as the receiver.
Otherwise, return the receiver.
-
asCollection
-
return myself as a Collection.
Redefined in collection to return themself.
-
asSequenceableCollection
-
return myself as a SequenceableCollection.
Redefined in SequenceableCollection
-
asValue
-
return a valueHolder for for the receiver
copying
-
cloneFrom: anObject
-
Helper for copy:
copy all instance variables from anObject into the receiver,
which should be of the same class as the argument.
-
cloneFrom: anObject performing: aSymbol
-
Helper for copy:
for each instance variable from anObject, send it aSymbol
and store the result into the receiver,
which should be of the same class as the argument.
-
cloneInstanceVariablesFrom: aPrototype
-
Shallow copy variables from a prototype into myself.
This copies instVars by name - i.e. same-named variables are
copied, others are not.
The variable slots are copied as available
(i.e. the min of both indexed sizes is used).
-
copy
-
return a copy of the receiver - defaults to shallowcopy here.
Notice, that copy does not copy dependents.
-
copyToLevel: level
-
a controlled deepCopy, where the number of levels can be specified.
Notice:
This method DOES NOT handle cycles/self-refs and does NOT preserve object identity;
i.e. identical references in the source are copied multiple times into the copy.
-
deepCopy
-
return a copy of the object with all subobjects also copied.
This method DOES handle cycles/self-refs and preserves object identity;
however the receivers class is not copied (to avoid the 'total' copy).
This deepCopy is a bit slower than the old (unsecure) one, since it
keeps track of already copied objects. If you are sure, that your
copied object does not include duplicates (or you do not care) and
no cycles are involved, you can use the old simpleDeepCopy,
which avoids this overhead (but may run into trouble).
Notice, that deepCopy does not copy dependents.
-
deepCopyError
-
raise a signal, that deepCopy is not allowed for this object
-
deepCopyUsing: aDictionary
-
a helper for deepCopy; return a copy of the object with
all subobjects also copied. If the to-be-copied object is in the dictionary,
use the value found there. The class of the receiver is not copied.
This method DOES handle cycles/self references.
-
deepCopyUsing: aDictionary postCopySelector: postCopySelector
-
a helper for deepCopy; return a copy of the object with
all subobjects also copied. If the to-be-copied object is in the dictionary,
use the value found there. The class of the receiver is not copied.
This method DOES handle cycles/self references.
-
postCopy
-
this is for compatibility with ST-80 code, which uses postCopy for
cleanup after copying, while ST/X passes the original in postCopyFrom:
(see there)
-
postDeepCopy
-
allows for cleanup after deep copying.
To be redefined in subclasses.
-
postDeepCopyFrom: aSource
-
allows for cleanup after deep copying
-
setHashFrom: anObject
-
set my identity-hash key to be the same as anObjects hash key.
This is an ST/X speciality, which is NOT available in other (especially OT based)
Smalltalks, and may not be available in future ST/X versions.
DO NEVER use this for normal application code.
-
shallowCopy
-
return a copy of the object with shared subobjects (a shallow copy)
i.e. the copy shares referenced instvars with its original.
-
simpleDeepCopy
-
return a copy of the object with all subobjects also copied.
This method does NOT handle cycles - but is included to allow this
slightly faster copy in situations where it is known that
no recursive references occur (LargeIntegers for example).
NOTICE: you will run into trouble, when trying this with recursive
objects (usually recursionInterrupt or memory-alert).
This method corresponds to the 'traditional' deepCopy found in the Blue book.
-
skipInstvarIndexInDeepCopy: index
-
a helper for deepCopy; only indices for which this method returns
false are copied in a deep copy.
The default is false here - which means that everything is copied.
Can be redefined in subclasses for partial copies
-
slowShallowCopy
-
return a copy of the object with shared subobjects (a shallow copy)
i.e. the copy shares referenced instvars with its original.
This method is only invoked as a fallback from #shallowCopy.
debugging
-
assert: aBooleanOrBlock
-
fail, if the argument does not evaluate to true and report an error
-
assert: aBooleanOrBlock message: messageIfFailing
-
fail, if the argument does not evaluate to true and report an error
-
basicInspect
-
launch an inspector on the receiver.
this method should NOT be redefined in subclasses.
-
breakPoint: someKey
-
Like halt, but disabled by default.
Can be easily enabled.
Can be filtered on the arguments value (typically: a symbol).
Code with breakpoints may be even checked into the source repository
-
breakPoint: someKey info: infoString
-
Like halt, but disabled by default.
Can be easily enabled.
Can be filtered on the arguments value (typically: a symbol).
Code with breakpoints may be even checked into the source repository
-
browse
-
open a browser on the receivers class
-
debuggingCodeFor: someKey is: aBlock
-
aBlock is evaluated if breakPoints for somekey are enabled.
Allows for debugging code to be enabled/disabled via the breakpoint browser.
Can be easily enabled.
Can be filtered on the arguments value (typically: a symbol).
Code with breakpoints may be even checked into the source repository
-
disableBreakPoint: someKey
-
disable a breakPoint
-
enableBreakPoint: someKey
-
enable a breakPoint
-
halt
-
enter debugger with halt-message.
The error is reported by raising the HaltSignal exception.
-
halt: aString
-
enter debugger with halt-message.
The error is reported by raising the HaltSignal exception.
-
inspect
-
launch an inspector on the receiver.
this method (or better: inspectorClass) can be redefined in subclasses
to start special inspectors.
-
inspectorClass
-
return the class to use for inspect.
Can (should) be redefined in classes for which a better inspector is available
-
inspectorExtraAttributes
-
extra (pseudo instvar) entries to be shown in an inspector.
Answers a dictionary of aString -> aBlock.
aString is name of extra attribute and MUST start with minus ($-).
aBlock returns the object representing extra attribute.
-
isBreakPointEnabled: someKey
-
controls which breakpoints to be enabled.
-
mustBeBoolean
-
this message is sent by the VM, if a non-Boolean receiver is encountered
in an if* or while* message.
Caveat: for now, this is only sent by the interpreter;
both the JIT and the stc compiler treat it as undefined.
-
mustBeKindOf: aClass
-
for compatibility & debugging support:
check if the receiver isKindOf:aClass and raise an error if not.
Notice:
it is VERY questionable, if it makes sense to add manual
type checks to a dynamically typed language like smalltalk.
It will, at least, slow down performance,
make your code less reusable and clutter your code with stupid sends
of this selector. Also, read the comment in isKindOf:, regarding the
use of isXXX check methods.
You see: The author does not like this at all ...
-
obsoleteFeatureWarning
-
in methods which are going to be changed, a send to
this method is used to tell programmers that some feature/semantics is
used which is going to be changed in later ST/X versions.
Hopefully, this warning message is annoying enough for you to change the code... ;-).
-
obsoleteFeatureWarning: message
-
in methods which are going to be changed, a send to
this method is used to tell programmers that some feature/semantics is
used which is going to be changed in later ST/X versions.
Hopefully, this warning message is annoying enough for you to change the code... ;-).
This message is intended for application developers, so its printed as info message.
-
obsoleteFeatureWarning: message from: aContext
-
in methods which are going to be changed, a send to
this method is used to tell programmers that some feature/semantics is
used which is going to be changed in later ST/X versions.
Hopefully, this warning message is annoying enough for you to change the code... ;-).
This message is intended for application developers, so its printed as info message.
-
obsoleteMethodWarning
-
in methods which are going to be obsoleted, a self send to
this method is used to tell programmers that a method is
used which is going to be removed in later ST/X versions.
Find all methods which will be obsolete soon by looking at senders of this message.
Hopefully, this warning message is annoying enough for you to change the code... ;-)
-
obsoleteMethodWarning: message
-
in methods which are going to be obsoleted, a self send to
this method is used to tell programmers that a method is
used which is going to be removed in later ST/X versions.
Find all methods which will be obsolete soon by looking at senders of this message.
Hopefully, this warning message is annoying enough for you to change the code... ;-)
-
obsoleteMethodWarning: message from: aContext
-
in methods which are going to be obsoleted, a self-send to
this method is used to tell programmers that a method is
used which is going to be removed in later ST/X versions.
Find all methods which will be obsolete soon by looking at senders of this message.
Hopefully, this warning message is annoying enough for you to change the code... ;-).
This message is intended for application developers, so its printed as info message.
-
todo
-
used to mark code pieces that have to be implemented
-
todo: aBlock
-
used to mark code pieces that have to be implemented
dependents access
-
addDependent: anObject
-
make the argument, anObject be a dependent of the receiver
-
breakDependents
-
remove all dependencies from the receiver
-
breakDependentsRecursively
-
remove all dependencies from the receiver and
recursively from all objects referred to by the receiver.
-
dependents
-
return a Collection of dependents.
The default implementation here uses a global WeakDictionary to store
dependents
This may be too slow for high frequency change&update,
therefore, some classes (Model) redefine this for better performance.
Notice the mentioning of a WeakDictionary - read the classes documentation.
-
dependents: aCollection
-
set the collection of dependents.
The default implementation here uses a global Dictionary to store
dependents which may be too slow for high frequency change&update.
Therefore, some classes (Model) redefine this for better performance.
-
dependentsDo: aBlock
-
evaluate aBlock for all of my dependents
-
myDependents
-
same as dependents - ST-80 compatibility
-
release
-
remove all references to objects that may refer to self.
Subclasses may redefine this method but should do a 'super release'.
-
removeDependent: anObject
-
make the argument, anObject be independent of the receiver
dependents access (non weak)
-
addNonWeakDependent: anObject
-
make the argument, anObject be a nonWeak dependent of the receiver.
Be careful: this nonWeakDependency will prevent the dependent from being
garbage collected unless the dependency is removed.
This is a private mechanism, for directed dependencies.
-
nonWeakDependents
-
return a Collection of nonWeakDependents - empty if there is none.
This is a private mechanism for directed dependencies.
-
nonWeakDependents: aCollection
-
set the collection of nonWeak dependents.
This is a private helper for directed dependencies.
-
removeNonWeakDependent: anObject
-
remove a nonWeak dependency from the receiver to the argument, anObject.
(i.e. make it independent of the receiver)
dependents-interests
-
addInterest: anInterest
-
install an interest forwarder.
Here, we use the nonWeakDependencies.
-
expressInterestIn: aspect for: anObject sendBack: aSelector
-
arrange for aSelector to be sent to anObject whenever the receiver
changes aspect.
-
interests
-
return a Collection of interests - empty if there is none.
Here, we use the nonWeakDependents for interests.
-
interestsFor: someOne
-
return a collection of interests of someOne - empty if there is none.
-
onChangeEvaluate: aBlock
-
arrange for aBlock to be evaluated whenever the receiver changes.
-
onChangeSend: aSelector to: anObject
-
arrange for aSelector to be sent to anObject whenever the receiver
changes.
-
removeInterest: anInterest
-
remove an interest forwarder.
Here, we use the nonWeakDependencies.
-
retractInterestIn: aspect for: someOne
-
remove the interest of someOne in the receiver changing aspect
(as installed with #expressInterestIn:for:sendBack:).
-
retractInterests
-
remove all interests in the receiver changing aspect
(as installed with #expressInterestIn:for:sendBack:).
-
retractInterestsFor: someOne
-
remove the interest of someOne in the receiver
(as installed with #onChangeSend:to:).
-
retractInterestsForWhich: aBlock
-
remove all interests in the receiver changing aspect
(as installed with #expressInterestIn:for:sendBack:).
-
retractInterestsIn: aspect
-
remove all interests in the receiver changing aspect
(as installed with #expressInterestIn:for:sendBack:).
dependents-st/v event simulation
-
removeActionsForEvent: eventName
-
remove ST/V-style event triggers.
-
removeAllActionsWithReceiver: anObject
-
remove ST/V-style event triggers.
-
triggerEvent: eventSymbol withArguments: parameters
-
perform ST/V-style event triggering.
-
when: eventSymbol send: selector to: anObject
-
install an ST/V-style interest forwarder.
Here, we use the nonWeakDependencies.
displaying
-
ascentOn: aGC
-
when displayed via displayOn:, some objects assume that the given y coordinate
is the baseline (strings, text etc. do), while others assume that the topY
coordinate is given by y.
In other words: some draw above the given y coordinate.
This method returns the number of pixels by which the receiver will draw above
the given y coordinate.
-
displayOn: aGCOrStream
-
Compatibility
append a printed desription on some stream (Dolphin, Squeak)
OR:
display the receiver in a graphicsContext at 0@0 (ST80).
This method allows for any object to be displayed in some view
(although the fallBack is to display its printString ...)
-
displayOn: aGC at: aPoint
-
ST-80 Compatibility
display the receiver in a graphicsContext - this method allows
for any object to be displayed in a ListView - for example.
-
displayOn: aGC x: x y: y
-
display the receiver in a graphicsContext - this method allows
for any object to be displayed in a ListView - for example.
-
displayOn: aGc x: x y: y opaque: opaque
-
display the receiver in a graphicsContext - this method allows
for any object to be displayed in a ListView - for example.
The fallBack here shows the receivers displayString.
Notice, that the string is displayed on the baseLine;
ask using #ascentOn: if required
-
displayOpaqueOn: aGC x: x y: y
-
display the receiver in a graphicsContext - this method allows
for any object to be displayed in a ListView - for example.
-
displayString
-
return a string used when displaying the receiver in a view;
for example an Inspector. This is usually the same as printString,
but sometimes redefined for a better look.
-
heightOn: aGC
-
return the height of the receiver, if it is to be displayed on aGC
-
widthFrom: startIndex to: endIndex on: aGC
-
return the width of the receiver, if it is to be displayed on aGC
-
widthOn: aGC
-
return the width of the receiver, if it is to be displayed on aGC
double dispatching
-
equalFromComplex: aComplex
-
adding this method here allows for any non-number to be compared to a complex
and return false from this comparison.
Reason: we want to be able to put both numbers and non-numbers into a collection
which uses #= (i.e. a Set or Dictionary).
-
equalFromFixedPoint: aFixedPoint
-
adding this method here allows for any non-number to be compared to a fixedPoint
and return false from this comparison.
Reason: we want to be able to put both numbers and non-numbers into a collection
which uses #= (i.e. a Set or Dictionary).
-
equalFromFloat: aFloat
-
adding this method here allows for any non-number to be compared to a float
and return false from this comparison.
Reason: we want to be able to put both numbers and non-numbers into a collection
which uses #= (i.e. a Set or Dictionary).
-
equalFromFraction: aFraction
-
adding this method here allows for any non-number to be compared to a fraction
and return false from this comparison.
Reason: we want to be able to put both numbers and non-numbers into a collection
which uses #= (i.e. a Set or Dictionary).
-
equalFromInteger: anInteger
-
adding this method here allows for any non-number to be compared to an integer
and return false from this comparison.
Reason: we want to be able to put both numbers and non-numbers into a collection
which uses #= (i.e. a Set or Dictionary).
-
equalFromLargeFloat: aLargeFloat
-
adding this method here allows for any non-number to be compared to a largeFloat
and return false from this comparison.
Reason: we want to be able to put both numbers and non-numbers into a collection
which uses #= (i.e. a Set or Dictionary).
-
equalFromLongFloat: aLongFloat
-
adding this method here allows for any non-number to be compared to a longFloat
and return false from this comparison.
Reason: we want to be able to put both numbers and non-numbers into a collection
which uses #= (i.e. a Set or Dictionary).
-
equalFromShortFloat: aShortFloat
-
adding this method here allows for any non-number to be compared to a shortFloat
and return false from this comparison.
Reason: we want to be able to put both numbers and non-numbers into a collection
which uses #= (i.e. a Set or Dictionary).
encoding & decoding
-
decodeAsLiteralArray
-
given a literalEncoding in the receiver,
create & return the corresponding object.
The inverse operation to #literalArrayEncoding.
-
encodeOn: anEncoder with: aParameter
-
not used any longer. Kept for backward comaptibility
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
encodingVectorForInstanceVariables
-
OBSOLETE, use elementDescriptorForInstanceVariables
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
encodingVectorForNonNilInstanceVariables
-
OBSOLETE, use elementDescriptorForNonNilInstanceVariables
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
fromLiteralArrayEncoding: aSpecArray
-
read my attributes from aSpecArray.
Recursively decodes arguments.
-
literalArrayEncoding
-
generate a literalArrayEncoding array for myself.
This uses #literalArrayEncodingSlotOrder which defines the slots and
order and #skippedInLiteralEncoding which defines slots to skip.
For most subclasses, there is no need to redefine those.
-
literalArrayEncodingSlotOrder
-
define the order in which inst-slots are saved when generating
a literalArrayEncoding
-
postDecodeFrom: aDecoder aspect: aspectSymbol
-
invoked by xmlDecoder (and others in the future), after an
object has been decoded (i.e. its instance variables have been restored)
-
skippedInLiteralEncoding
-
return a Collection with it's elements are slots for skipping
error handling
-
appropriateDebugger: aSelector
-
return an appropriate debugger to use.
If there is already a debugger active on the stack, and it is
the DebugView, return MiniDebugger (as a last chance) otherwise abort.
-
cannotSendMessage: aMessage to: someReceiver
-
this message is sent by the runtime system (VM),
when a message is sent to some object, whose class is not
a valid behavior (see documentation in Behavior).
-
conversionErrorSignal
-
return the signal used for conversion error handling
-
doesNotUnderstand: aMessage
-
this message is sent by the runtime system (VM) when
a message is not understood by some object (i.e. there
is no method for that selector). The original message has
been packed into aMessage (i.e. the receiver, selector and
any arguments) and the original receiver is then sent the
#doesNotUnderstand: message.
Here, we raise another signal which usually enters the debugger.
You can of course redefine #doesNotUnderstand: in your classes
to implement message delegation,
or handle the MessageNotUnderstood exception gracefully.
-
elementBoundsError
-
report an error that badElement is out of bounds
(i.e. cannot be put into that collection).
The error is reported by raising the ElementBoundsError exception.
-
elementBoundsError: aValue
-
report an error that aValue is not valid as element
(i.e. cannot be put into that collection).
The error is reported by raising the ElementBoundsError exception.
-
elementNotCharacter
-
report an error that object to be stored is no Character.
(usually when storing into Strings).
The error is reported by raising the ElementBoundsError exception.
-
elementNotInteger
-
report an error that object to be stored is not Integer.
(in collections that store integers only).
The error is reported by raising the ElementOutOfBoundsSignal exception.
-
error
-
report error that an error occured.
The error is reported by raising the Error exception,
which is non-proceedable.
If no handler has been setup, a debugger is entered.
-
error: aString
-
Raise an error with error message aString.
The error is reported by raising the Error exception,
which is non-proceedable.
If no handler has been setup, a debugger is entered.
-
error: aString mayProceed: mayProceed
-
enter debugger with error-message aString.
The error is reported by raising either the
non-proceedable Error exception,
or the ProceedableError exception.
-
errorInvalidFormat
-
report an error that some conversion to/from string representation failed
typically when converting numbers, date, time etc.
-
errorKeyNotFound: aKey
-
report an error that a key was not found in a collection.
The error is reported by raising the KeyNotFoundError exception.
-
errorNotFound
-
report an error that no element was found in a collection.
The error is reported by raising the NotFoundSignal exception.
-
errorNotFound: errorString
-
report an error that no element was found in a collection.
The error is reported by raising the NotFoundSignal exception.
-
errorSignal
-
return the signal used for error/error: handling
-
handlerForSignal: exceptionHandler context: theContext originator: originator
-
should never be invoked for non-blocks/non-exceptions/non-signals
-
implementedBySubclass
-
this is sent by ST/V code - its the same as #subclassResponsibility
-
indexNotInteger
-
report an error that index is not an Integer.
(when accessing collections indexed by an integer key).
The error is reported by raising the NonIntegerIndexSignal exception.
-
indexNotInteger: anIndex
-
report an error that index is not an Integer.
(when accessing collections indexed by an integer key).
The error is reported by raising the NonIntegerIndexSignal exception.
-
indexNotIntegerOrOutOfBounds: index
-
report an error that index is either non-integral or out of bounds
-
integerCheckError
-
generated when a variable declared with an integer type gets a bad value assigned
-
invalidCodeObject
-
this is sent by VM if it encounters some non-method for execution
-
invalidMessage
-
this is sent by ST/V code - its the same as #shouldNotImplement
-
mustBeRectangle
-
report an argument-not-rectangle-error
-
mustBeString
-
report an argument-not-string-error
-
notIndexed
-
report an error that receiver has no indexed instance variables.
The error is reported by raising the SubscriptOutOfBoundsSignal exception.
-
notYetImplemented
-
report an error that some functionality is not yet implemented.
This is here only for compatibility - it has the same meaning as shouldImplement.
-
openDebuggerOnException: ex
-
enter the debugger on some unhandled exception
-
primitiveFailed
-
report an error that some primitive code failed.
The error is reported by raising the PrimitiveFailure exception.
-
primitiveFailed: messageString
-
report an error that some primitive code failed.
The error is reported by raising the PrimitiveFailureSignal exception.
-
shouldImplement
-
report an error that this message/functionality should be implemented.
This is send by automatically generated method bodies or inside as-yet-uncoded
branches of existing methods.
-
shouldImplement: what
-
report an error that this message/functionality should be implemented.
This is send by automatically generated method bodies or inside as-yet-uncoded
branches of existing methods.
-
shouldNeverBeReached
-
report an error that this point may never be reached.
-
shouldNeverBeSent
-
report an error that this message may never be sent to the reciever
-
shouldNotImplement
-
report an error that this message should not be implemented -
i.e. that a method is invoked which is not appropriate for the receiver.
-
subclassResponsibility
-
report an error that this message should have been reimplemented in a subclass
-
subclassResponsibility: msg
-
report an error that this message should have been reimplemented in a subclass
-
subscriptBoundsError
-
report an error that some index is out of bounds.
(when accessing indexable collections).
The error is reported by raising the SubscriptOutOfBoundsSignal exception.
-
subscriptBoundsError: anIndex
-
report an error that anIndex is out of bounds.
(when accessing indexable collections).
The error is reported by raising the SubscriptOutOfBoundsSignal exception.
-
typeCheckError
-
generated when a variable declared with a type hint gets a bad
value assigned
evaluation
-
argumentCount
-
compatibility with Blocks and Messages.
Answer 0, since we only understand #value.
By implementing this, you can pass any object as an exception handler.
-
value
-
return the receiver itself.
This allows every object to be used where blocks or valueHolders
are typically used, and allows for valueHolders and blocks to be
used interchangably in some situations.
Time will show, if this is a good idea or leads to sloppy programming
style ... (the idea was borrowed from the Self language).
WARNING: dont 'optimize' away ifXXX: blocks
(i.e. do NOT replace
foo ifTrue:[var1] ifFalse:[var2]
by:
foo ifTrue:var1 ifFalse:var2
)
- the compilers will only generate inline code for the if,
iff the argument(s) are blocks - otherwise, a true send is
generated.
This 'oprimization' will work semantically correct,
but execute SLOWER instead.
finalization
-
disposed
-
OBSOLETE INTERFACE: use #finalize
this is invoked for objects which have been registered
in a Registry, when the original object dies.
Subclasses may redefine this method
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
executor
-
Return the object which does the finalization for me.
This interface is also VW & Sqeak compatible,
-
finalizationLobby
-
answer a Registry used for finalization.
Use a generic Registry for any object.
Subclasses using their own Registry should redefine this
-
finalize
-
this is invoked for executor objects which have been registered
in a Registry, when the original object dies.
Subclasses may redefine this method
This interface is also VW-compatible
-
reRegisterForFinalization
-
re-register mySelf for later finalization.
This will create a new executor, which will receive a #finalize message when
the receiver is garbage collected.
-
registerForFinalization
-
register mySelf for later finalization.
Once registered, the executor of the receiver will receive a #finalize message when
the receiver is garbage collected.
-
shallowCopyForFinalization
-
OBSOLETE INTERFACE: use #executor.
This is used to aquire a copy to be used for finalization -
(the copy will be sent a #finalize message; see the documentation in the Registry class)
This method can be redefined for more efficient copying - especially for large objects.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
unregisterForFinalization
-
unregister mySelf from later finalization
initialization
-
initialize
-
just to ignore initialize to objects which do not need it
interrupt handling
-
childSignalInterrupt
-
death of a child process (unix process) - do nothing
-
customInterrupt
-
a custom interrupt - but no handler has defined
-
errorInterrupt: errorID with: aParameter
-
subsystem error. The arguments errorID and aParameter are the values passed
to the 'errorInterruptWithIDAndParameter(id, param)' function,
which can be called from C subsystems to raise an (asynchronous)
error exception.
Currently, this is used to map XErrors to smalltalk errors, but can be
used from other C subsystems too, to upcast errors.
Especially, for subsystems which call errorHandler functions asynchronously.
IDs (currently) used:
#DisplayError ..... x-error interrupt
#XtError ..... xt-error interrupt (Xt interface is not yet published)
-
exceptionInterrupt
-
exception interrupt - enter debugger
-
fpExceptionInterrupt
-
a floating point exception occured - this one
has to be handled differently since it comes asynchronous
on some machines (for example, on machines with a separate FPU
or superscalar architectures. Also, errors from within primitive code
(or library functions such as GL) are sent via the Unix-signal
mechanism this way.
-
internalError: msg
-
this is triggered, when VM hits some bad error,
such as corrupted class, corrupted method/selector array
etc. The argument string gives some more information on what happened.
(for example, if you set an objects class to a non-behavior, nil etc.).
Its not guaranteed, that the system is in a working condition once
this error occurred ....
-
ioInterrupt
-
I/O (SIGIO/SIGPOLL) interrupt (supposed to be sent to Processor).
If we arrive here, there is either no handler (ObjMem>>ioInterruptHandler)
or it does not understand the ioInterrupt message.
In any case, this is a sign of some big trouble. Enter debugger.
-
memoryInterrupt
-
out-of-memory interrupt and no handler - enter debugger
-
recursionInterrupt
-
recursion limit (actually: stack overflow) interrupt.
This interrupt is triggered, when a process stack grows above
its stackLimit - usually, this leads into the debugger, but
could be caught.
Under Unix, the stackLimit may be increased in the handler,
and the exception can be resumed.
Sorry, but under win32, the stack cannot grow, and the exception
is not proceedable.
At the time we arrive here, the system has still some stack
as a reserve so we can continue to do some useful work, or cleanup,
or debug for a while.
If the signal is ignored, and the stack continues to grow, there
will be a few more chances (and more interrupts) before the VM
terminates the process.
-
schedulerInterrupt
-
scheduler interrupt (supposed to be sent to Processor).
If we arrive here, either the Processor does not understand it,
or it has been set to nil. In any case, this is a sign of some
big trouble. Enter debugger.
-
signalInterrupt: signalNumber
-
unix signal occured - some signals are handled as Smalltalk Exceptions
(SIGPIPE), others (SIGBUS) are rather fatal...
In any case, IF a smalltalk-signal has been connected to the OS signal, that one is raised.
Otherwise, a dialog is shown, asking the user on how to handle the signal.
TODO: add another argument, giving more detailed signal info (PC, VADDR,
exact cause etc.). This helps if segvs occur in primitive code.
Currently (temporary kludge), these are passed as global variables.
-
spyInterrupt
-
spy interrupt and no handler - enter debugger
-
startMiniDebuggerOrExit: text
-
some critical condition happened.
Start a mini debugger or exit if none is present
-
timerInterrupt
-
timer interrupt and no handler - enter debugger
-
userInterrupt
-
user (^c) interrupt.
This is typically sent by the VM, when a ctrl-C is typed at the
controlling tty (i.e. in the xterm).
-
userInterruptIn: aContext
-
user (^c) interrupt - enter debugger, but show aContext
as top-context.
This is used to hide any intermediate scheduler contexts,
in case of an interrupted process. Typically, this is sent by
the WindowGroup, when a keyboardEvent for the ctrl-C key is
processed.
message sending
-
perform: aSelector
-
send the message aSelector to the receiver
-
perform: aSelector inClass: aClass withArguments: argArray
-
send the message aSelector with all args taken from argArray
to the receiver as a super-send message.
This is actually more flexible than the normal super-send, since it allows
to execute a method in ANY superclass of the receiver (not just the
immediate superclass).
Thus, it is (theoretically) possible to do
'5 perform:#< inClass:Magnitude withArguments:#(6)'
and evaluate Magnitudes compare method even if there was one in Number.
This method is used by the interpreter to evaluate super sends
and could be used for very special behavior (language extension ?).
WARNING: this is an ST/X feature - probably not found in other smalltalks.
-
perform: aSelector with: arg
-
send the one-arg-message aSelector to the receiver
-
perform: aSelector with: arg1 with: arg2
-
send the two-arg-message aSelector to the receiver
-
perform: aSelector with: arg1 with: arg2 with: arg3
-
send the three-arg-message aSelector to the receiver
-
perform: aSelector with: arg1 with: arg2 with: arg3 with: arg4
-
send the four-arg-message aSelector to the receiver
-
perform: aSelector with: arg1 with: arg2 with: arg3 with: arg4 with: arg5
-
send the five-arg-message aSelector to the receiver
-
perform: aSelector with: arg1 with: arg2 with: arg3 with: arg4 with: arg5 with: arg6
-
send the six-arg-message aSelector to the receiver
-
perform: aSelector withArguments: argArray
-
send the message aSelector with all args taken from argArray
to the receiver.
-
perform: aSelector withOptionalArgument: arg
-
send aSelector-message to the receiver.
If the message expects an argument, pass arg.
-
perform: aSelector withOptionalArgument: optionalArg1 and: optionalArg2
-
send aSelector-message to the receiver.
Depending on the number of arguments the message expects,
pass either none, 1, or 2 arguments.
-
perform: aSelector withOptionalArgument: optionalArg1 and: optionalArg2 and: optionalArg3
-
send aSelector-message to the receiver.
Depending on the number of arguments the message expects,
pass either none, 1, 2 or 3 arguments.
-
perform: aSelector withOptionalArgument: optionalArg1 and: optionalArg2 and: optionalArg3 and: optionalArg4
-
send aSelector-message to the receiver.
Depending on the number of arguments the message expects,
pass either none, 1, 2, 3 or 4 arguments.
-
performMethod: aMethod
-
invoke aMethod on the receiver.
The method should be a zero-argument method.
This is a non-object-oriented entry, applying a method
in a functional way on a receiver.
Warning:
Take care for the method to be appropriate for the
receiver - no checking is done by the VM.
-
performMethod: aMethod arguments: argumentArray
-
invoke aMethod on the receiver, passing an argumentArray.
The size of the argumentArray should match the number of args
expected by the method.
This is a non-object-oriented entry, applying a method
in a functional way on a receiver.
Warning:
Take care for the method to be appropriate for the
receiver - no checking is done by the VM.
-
performMethod: aMethod with: arg
-
invoke aMethod on the receiver, passing an argument.
The method should be a one-argument method.
This is a non-object-oriented entry, applying a method
in a functional way on a receiver.
Warning:
Take care for the method to be appropriate for the
receiver - no checking is done by the VM.
-
performMethod: aMethod with: arg1 with: arg2
-
invoke aMethod on the receiver, passing two arguments.
The method should be a two-argument method.
This is a non-object-oriented entry, applying a method
in a functional way on a receiver.
Warning:
Take care for the method to be appropriate for the
receiver - no checking is done by the VM.
-
performMethod: aMethod with: arg1 with: arg2 with: arg3
-
invoke aMethod on the receiver, passing three arguments.
The method should be a three-argument method.
This is a non-object-oriented entry, applying a method
in a functional way on a receiver.
Warning:
Take care for the method to be appropriate for the
receiver - no checking is done by the VM.
object persistency
-
elementDescriptorFor: anAspectSymbol
-
support for persistency:
answer a collection of associations containing the
objects state to be encoded for aspect.
Association key is the instance variable name or access selector,
association value is the contents of the instance variable.
The default is to return the contents of all non-nil instance variables
-
elementDescriptorForInstanceVariables
-
return all instance variables for visiting/encoding
-
elementDescriptorForInstanceVariablesMatching: aBlock
-
return all instance variables which conform to aBlock, for encoding/visiting.
Indexed vars are all included.
-
elementDescriptorForNonNilInstanceVariables
-
return all non-nil instance variables for visiting/encoding
printing & storing
-
basicPrintOn: aStream
-
append the receivers className with an articel to the argument, aStream
-
className
-
return the classname of the receivers class
-
classNameWithArticle
-
return a string consisting of classname preceeded by an article.
(dont expect me to write national variants for this ... :-)
If you have special preferences, redefine it ...
-
errorPrint
-
print the receiver on the Transcript and Stderr.
The Transcript is directed to the standard error stream on
headless applications.
-
errorPrintCR
-
print the receiver followed by a cr on the error stream(s).
The Transcript is directed to the standard error stream on
headless applications.
-
errorPrintNL
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
errorPrintNewline
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
infoPrint
-
print the receiver on the standard error stream.
This is meant for information messages which are not warnings
or fatal messages.
These messages can be turned on/off by 'Object infoPrinting:true/false'
-
infoPrintCR
-
print the receiver followed by a cr on the standard error stream.
This is meant for information messages which are not warnings
or fatal messages.
These messages can be turned on/off by 'Object infoPrinting:true/false'
-
infoPrintNL
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
print
-
print the receiver on the standard output stream (which is not the Transcript)
-
printCR
-
print the receiver followed by a cr on the standard output stream (which is not the Transcript)
-
printNL
-
print the receiver followed by a cr on the standard output stream
This exists for GNU Smalltalk compatibility - please use #printCR.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
printNewline
-
print the receiver followed by a cr on the standard output stream.
This exists for backward compatibility - please use #printCR.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
printOn: aStream
-
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.
The default here is to output the receivers class name.
BUT: this method is heavily redefined for objects which
can print prettier.
-
printOn: aStream format: format
-
this may be redefined in subclasses.
Defined here for compatibility with subclasses
-
printOn: aStream leftPaddedTo: size
-
print the receiver on aStream, padding with spaces up to size.
padding is done on the left.
-
printOn: aStream leftPaddedTo: size with: padCharacter
-
print the receiver on aStream, padding with padCharacters up to size.
padding is done on the left.
-
printOn: aStream paddedTo: size
-
print the receiver on aStream, padding with spaces up to size.
-
printOn: aStream paddedTo: size with: padCharacter
-
print the receiver on aStream, padding with padCharacter up to size
-
printOn: aStream zeroPaddedTo: size
-
print the receiver on aStream, padding with zeros up to size.
Usually used with float numbers.
-
printRightAdjustLen: size
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
printString
-
return a string for printing the receiver.
Since we now use printOn: as the basic print mechanism,
we have to create a stream and print into it.
-
printStringFormat: orintFormat
-
subclasses may redefine this.
Defined here to avoid type checks
-
printStringLeftPaddedTo: size
-
return my printString as a right-adjusted string of length size;
characters on the left are filled with spaces.
If the printString is longer than size,
it is returned unchanged (i.e. not truncated)
-
printStringLeftPaddedTo: size ifLarger: alternative
-
return my printString as a right-adjusted string of length size;
characters on the left are filled with spaces.
If the printString is larger than size,
return the result from evaluating alternative.
-
printStringLeftPaddedTo: size with: padCharacter
-
return my printString as a right-adjusted string of length size;
characters on the left are filled with padCharacter.
If the printString is longer than size,
it is returned unchanged (i.e. not truncated)
-
printStringLeftPaddedTo: size with: padCharacter ifLarger: alternative
-
return my printString as a right-adjusted string of length size;
characters on the left are filled with padCharacter.
If the printString is larger than size,
return the result from evaluating alternative.
-
printStringLimitedTo: sizeLimit
-
return a string for printing the receiver, but limit the result string in its size.
-
printStringOnError: exceptionBlock
-
return a string for printing the receiver; if any error occurs, return the result from
evaluating exceptionBlock. Useful to print something in an exceptionHandler or other
cleanup code.
-
printStringPaddedTo: size
-
return a printed representation of the receiver,
padded with spaces (at the right) up to size.
If the printString is longer than size,
it is returned unchanged (i.e. not truncated)
-
printStringPaddedTo: size ifLarger: alternative
-
return a printed representation of the receiver,
padded with spaces (at the right) up to size.
If the resulting printString is too large,
return the result from evaluating alternative.
-
printStringPaddedTo: size with: padCharacter
-
return a printed representation of the receiver,
padded with padCharacter (at the right) up to size.
If the printString is longer than size,
it is returned unchanged (i.e. not truncated)
-
printStringPaddedTo: size with: padCharacter ifLarger: alternative
-
return a printed representation of the receiver,
padded with padCharacter (at the right) up to size.
If the resulting printString is too large,
return the result from evaluating alternative.
-
printStringRightAdjustLen: size
-
obsolete - just a name confusion.
This method will go away ...
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
printStringZeroPaddedTo: size
-
return a printed representation of the receiver,
padded with zero (at the right) characters up to size.
Usually used with float numbers.
-
printfPrintString: ignoredFormat
-
fallback to default printString
(for compatibility with float and integer-printing)
-
store
-
store the receiver on standard output.
this method is useless, but included for compatibility.
-
storeArrayElementOn: aStream
-
store an object as an Array element.
Subclasses may redefine this to omit a leading '#'
-
storeCR
-
store the receiver on standard output; append a carriage return.
-
storeNl
-
store the receiver on standard output; append a newline.
This method is included for backward compatibility- use #storeCR.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
storeOn: aStream
-
store the receiver on aStream; i.e. print an expression which will
reconstruct the receiver.
Notice, that no self referencing or cyclic objects can be represented
in this format.
Use storeBinaryOn:, which handles these cases correctly.
-
storeString
-
return a string representing an expression to reconstruct the receiver.
Notice, that no self referencing or cyclic objects can be represented
in this format.
Use storeBinaryOn:, which handles these cases correctly.
queries
-
basicSize
-
return the number of the receivers indexed instance variables,
0 if it has none.
This method should NOT be redefined in any subclass (except with great care, for tuning)
-
byteSize
-
return the number of bytes in the receivers indexed instance variables,
0 if it has none. This only returns non-zero for non-pointer indexed
instvars i.e. byteArrays, wordArrays etc.
Notice: for Strings the returned size may look strange.
Only useful with binary storage.
-
class
-
return the receivers class
-
respondsTo: aSelector
-
return true, if the receiver implements a method with selector equal
to aSelector; i.e. if there is a method for aSelector in either the
receivers class or one of its superclasses.
Notice, that this does not imply, that such a message can be sent without
an error being raised. For example, an implementation could send
#shouldNotImplement or #subclassResponsibility.
-
respondsToArithmetic
-
return true, if the receiver responds to arithmetic messages.
false is returned here - the method is redefined in ArithmeticValue.
-
size
-
return the number of the receivers indexed instance variables;
this method may be redefined in subclasses
-
species
-
return a class which is similar to (or the same as) the receivers class.
This is used to create an appropriate object when creating derived
copies in the collection classes (sometimes redefined).
-
yourself
-
return the receiver - used for cascades to return self at the end
secure message sending
-
askFor: aSelector
-
try to send the receiver the message, aSelector.
If it does not understand it, return false.
Otherwise the real value returned.
Useful to send messages such as: #isColor to unknown receivers.
-
askFor: aSelector with: argument
-
try to send the receiver the message, aSelector.
If it does not understand it, return false.
Otherwise the real value returned.
Useful to send messages such as: #isXXX: to unknown receivers.
-
askFor: aSelector with: arg1 with: arg2
-
try to send the receiver the message, aSelector.
If it does not understand it, return false.
Otherwise the real value returned.
Useful to send messages such as: #isXXX: to unknown receivers.
-
perform: aSelector ifNotUnderstood: exceptionBlock
-
try to send message aSelector to the receiver.
If its understood, return the method's returned value,
otherwise return the value of the exceptionBlock.
Read this:
Many programmers do an Error-handle to perform a similar
checked-message send. However, this method is more specific,
in that only errors for the given selector are cought - not any other
doesNotUnderstand, and especially not any other error.
-
perform: aSelector with: argument ifNotUnderstood: exceptionBlock
-
try to send message aSelector to the receiver.
If its understood, return the method's returned value,
otherwise return the value of the exceptionBlock.
Read this:
Many programmers do an Error-handle to perform a similar
checked-message send. However, this method is more specific,
in that only errors for the given selector are cought - not any other
doesNotUnderstand, and especially not any other error.
-
perform: aSelector with: arg1 with: arg2 ifNotUnderstood: exceptionBlock
-
try to send message aSelector to the receiver.
If its understood, return the method's returned value,
otherwise return the value of the exceptionBlock.
Read this:
Many programmers do an Error-handle to perform a similar
checked-message send. However, this method is more specific,
in that only errors for the given selector are cought - not any other
doesNotUnderstand, and especially not any other error.
-
perform: aSelector withArguments: argumentArray ifNotUnderstood: exceptionBlock
-
try to send message aSelector to the receiver.
If its understood, return the method's returned value,
otherwise return the value of the exceptionBlock.
Read this:
Many programmers do an Error-handle to perform a similar
checked-message send. However, this method is more specific,
in that only errors for the given selector are cought - not any other
doesNotUnderstand, and especially not any other error.
signal constants
-
messageNotUnderstoodSignal
-
special queries
-
allOwners
-
return a collection of all objects referencing the receiver
-
references: anObject
-
return true, if the receiver refers to the argument, anObject.
- for debugging only
-
referencesAny: aCollection
-
return true, if the receiver refers to any object from
the argument, aCollection.
- for debugging only
-
referencesDerivedInstanceOf: aClass
-
return true, if the receiver refers to an instance of
the argument, aClass or its subclass. This method exists
to support searching for users of a class.
-
referencesForWhich: checkBlock do: actionBlock
-
-
referencesInstanceOf: aClass
-
return true, if the receiver refers to an instance of
the argument, aClass.This method exists
to support searching for users of a class.
-
referencesObject: anObject
-
return true, if the receiver refers to the argument, anObject.
- for debugging only
synchronized evaluation
-
freeSynchronizationSemaphore
-
free synchronizationSemaphore. May be used, to save memory when
an object is no longer used synchronized.
-
synchronizationSemaphore
-
return the synchronization semaphore for myself.
subclasses may redefine
-
synchronizationSemaphore: aSemaphore
-
set the synchronisationSemaphore for myself.
subclasses may redefine this method
-
synchronized: aBlock
-
evaluate aBlock synchronized, i.e. use a monitor for this object
system primitives
-
asOop
-
ST-80 compatibility:
ST-80 returns an OOP-identity based number here (I guess: its address
or index); since ST/X has no such thing, and the objects address cannot
be used (since its changing over time), we return the objects identityHash
key, which provides (at least) some identity indication.
However, notice that (in contrast to ST-80's #asOop), the identityHash
key of two non-identical objects may be the same.
You'd better not use it - especially do not misuse it.
-
beImmutable
-
experimental - not yet usable; do not use
-
beMutable
-
experimental - not yet usable; do not use
-
become: anotherObject
-
make all references to the receiver become references to anotherObject
and vice-versa. Notice the vice-versa; see #becomeSameAs: for a one-way become.
This can be a very dangerous operation - be warned.
In general, using #become: should be avoided if possible, since it may
produce many strange effects (think of hashing in Sets, Dictionaries etc.).
This may also be an expensive (i.e. slow) operation,
since in the worst case, the whole memory has to be searched for
references to the two objects (although the primitive tries hard to
limit the search, for acceptable performance in most cases).
This method fails, if the receiver or the argument is a SmallInteger
or nil, or is a context of a living method (i.e. one that has not already
returned).
(notice that #become: is not used heavily by the system
- the Collection-classes have been rewritten to not use it.)
-
becomeNil
-
make all references to the receiver become nil - effectively getting
rid of the receiver.
This can be a very dangerous operation - be warned.
This may be an expensive (i.e. slow) operation.
The receiver may not be a SmallInteger or a context of a living method.
-
becomeSameAs: anotherObject
-
make all references to the receiver become references to anotherObject
but NOT vice versa (as done in #become:).
This can be a very dangerous operation - be warned.
In general, using #become: should be avoided if possible, since it may
produce many strange effects (think of hashing in Sets, Dictionaries etc.).
This may also be an expensive (i.e. slow) operation,
since in the worst case, the whole memory has to be searched for
references to the two objects (although the primitive tries hard to
limit the search, for acceptable performance in most cases).
This method fails, if the receiver or the argument is a SmallInteger
or nil, or is a context of a living method (i.e. one that has not already returned).
-
changeClassTo: otherClass
-
changes the class of the receiver to the argument, otherClass.
This is only allowed (possible), if the receivers class and the argument
have the same structure (i.e. number of named instance variables and
type of indexed instance variables).
If the structures do not match, or any of the original class or new class
is UndefinedObject or a Smallinteger, a primitive error is triggered.
-
changeClassToThatOf: anObject
-
changes the class of the receiver to that of the argument, anObject.
This is only allowed (possible), if the receivers class and the arguments
class have the same structure (i.e. number of named instance variables and
type of indexed instance variables). If the structures do not match, or any
of the objects is nil or a Smallinteger, a primitive error is triggered.
-
isImmutable
-
experimental - not yet usable; do not use
-
replaceReferencesTo: anObject with: newRef
-
if the receiver refers to the argument, anObject, replace this reference with newRef.
Return true, if any reference was changed.
Notice: this does not change the class-reference.
testing
-
? defaultValue
-
a syntactic sugar-piece:
if the receiver is nil, return the defaultValue;
otherwise, return the receiver.
This method is only redefined in UndefinedObject - therefore,
the recevier is retuned here.
Thus, if foo and bar are simple variables or constants,
foo ? bar
is the same as:
(foo isNil ifTrue:[bar] ifFalse:[foo])
if they are message sends, the equivalent code is:
[
|t1 t2|
t1 := foo.
t2 := bar.
t1 isNil ifTrue:[t2] ifFalse:[t1]
] value
Can be used to provide defaultValues to variables,
as in:
foo := arg ? #defaultValue
Note: this method should never be redefined in classes other than UndefinedObject.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
-
?? defaultValue
-
a syntactic sugar-piece:
much like ?, but sends #value to the argument if required.
(i.e. its the same as #ifNil:)
If the receiver is nil, return the defaultValues value;
otherwise, return the receiver.
This method is only redefined in UndefinedObject - therefore,
the recevier is retuned here.
Thus, if foo and bar are simple variables or constants,
foo ?? bar
is the same as:
(foo isNil ifTrue:[bar value] ifFalse:[foo])
if they are message sends, the equivalent code is:
[
|t t2|
t := foo.
t isNil ifTrue:[bar value] ifFalse:[t]
] value
Can be used to provide defaultValues to variables,
as in:
foo := arg ?? [ self computeDefault ]
Note: this method should never be redefined in classes other than UndefinedObject.
-
ifNil: aBlockOrValue
-
return myself, or the result from evaluating the argument, if I am nil.
This is much like #?, but sends #value to the argument in case of a nil
receiver.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
-
ifNil: nilBlockOrValue ifNotNil: notNilBlockOrValue
-
return the value of the first arg, if I am nil,
the result from evaluating the 2nd argument, if I am not nil.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
-
ifNotNil: aBlockOrValue
-
return myself if nil, or the result from evaluating the argument,
if I am not nil.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
-
ifNotNil: notNilBlockOrValue ifNil: nilBlockOrValue
-
return the value of the 2nd arg, if I am nil,
the result from evaluating the 1st argument, if I am not nil.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
-
ifNotNilDo: aBlock
-
if the reciever is non-nil, return the value of aBlock, passing myself as argument.
Otherwise do nothing and return nil.
-
isArray
-
return true, if the receiver is some kind of array (or weakArray etc);
false is returned here - the method is only redefined in Array.
-
isAssociation
-
return true, if the receiver is some kind of association;
false is returned here - the method is only redefined in Association.
-
isBehavior
-
return true, if the receiver is describing another objects behavior.
False is returned here - the method is only redefined in Behavior.
-
isBlock
-
return true, if the receiver is some kind of block;
false returned here - the method is only redefined in Block.
-
isBoolean
-
return true, if the receiver is a boolean;
false is returned here - the method is only redefined in Boolean.
-
isByteArray
-
return true, if the receiver is some kind of bytearray;
false is returned here - the method is only redefined in ByteArray.
-
isByteCollection
-
return true, if the receiver is some kind of byte collection,
i.e. #at: and #at:put: accesses a byte. This is different from 'self class isBytes',
since e.g. in BitArray single bits are accessed, but it is implemented as variableBytes class.
false is returned here - the method is only redefined in UninterpretedBytes.
-
isCharacter
-
return true, if the receiver is some kind of character;
false is returned here - the method is only redefined in Character.
-
isClass
-
return true, if the receiver is some kind of class
(real class, not just behavior);
false is returned here - the method is only redefined in Class.
-
isCollection
-
return true, if the receiver is some kind of collection;
false is returned here - the method is only redefined in Collection.
-
isColor
-
return true, if the receiver is some kind of color;
false is returned here - the method is only redefined in Color.
-
isCons
-
return true, if the receiver is a cons (pair);
false is returned here - the method is only redefined in Cons.
-
isContext
-
return true, if the receiver is some kind of context;
false returned here - the method is only redefined in Context.
-
isEmptyOrNil
-
return true if I am nil or an empty collection - return false here.
(from Squeak)
-
isException
-
answer true, if this ia an Exception, that may be queried about its type
-
isExceptionCreator
-
return true, if the receiver can create exceptions,
this includes #raise, #raiseRequest as well as the behavior of
an exception handler, such as the #accepts: and #handles: messages
-
isExceptionHandler
-
return true, if the receiver responds to the exception handler protocol,
especially to the #accepts: and #handles: messages
-
isExternalLibraryFunction
-
return true, if the receiver is some kind of externalLibrary function;
false is returned here - the method is only redefined in ExternalLibraryFunction.
-
isExternalStream
-
return true, if the receiver is some kind of externalStream;
false is returned here - the method is only redefined in ExternalStream.
-
isFileStream
-
return true, if the receiver is some kind of fileStream;
false is returned here - the method is only redefined in FileStream.
-
isFilename
-
return true, if the receiver is some kind of filename;
false is returned here - the method is only redefined in Filename.
-
isFixedPoint
-
return true, if the receiver is some kind of fixedPoint number;
false is returned here - the method is only redefined in FixedPoint.
-
isFixedSize
-
return true if the receiver cannot grow easily
(i.e. a grow may be expensive, since it involves a become:)
-
isFloat
-
return true, if the receiver is some kind of floating point number;
false is returned here.
Same as #isLimitedPrecisionReal, but a better name ;-)
-
isForm
-
return true, if the receiver is some kind of form;
false is returned here - the method is only redefined in Form.
-
isFraction
-
return true, if the receiver is some kind of fraction;
false is returned here - the method is only redefined in Fraction.
-
isHierarchicalItem
-
used to decide if the parent is a hierarchical item or the model
-
isImage
-
return true, if the receiver is some kind of image;
false is returned here - the method is only redefined in Image.
-
isImageOrForm
-
return true, if the receiver is some kind of image or form;
false is returned here - the method is only redefined in Image and Form.
-
isImmediate
-
return true if I am an immediate object
i.e. I am represented in the pointer itself and
no real object header/storage is used me.
(currently, only SmallIntegers, some characters and nil return true)
-
isInteger
-
return true, if the receiver is some kind of integer number;
false is returned here - the method is only redefined in Integer.
-
isInterestConverter
-
return true if I am a kind of interest forwarder
-
isInternalByteStream
-
return true, if the receiver is some kind of Stream for reading bytes;
false is returned here - the method is only redefined in PeekableStream.
-
isJavaClass
-
return true, if this is a javaClass.
false is returned here - the method is only redefined in JavaClass.
-
isJavaClassRef
-
return true, if this is a JavaClassRef.
false is returned here - the method is only redefined in JavaClassRef.
-
isJavaContext
-
return true, if this is a javaContext.
false is returned here - the method is only redefined in JavaContext.
-
isJavaMethod
-
return true, if this is a JavaMethod.
false is returned here - the method is only redefined in JavaMethod.
-
isJavaMethodRef
-
return true, if this is a JavaMethodRef.
false is returned here - the method is only redefined in JavaMethodRef.
-
isJavaObject
-
return true, if this is a javaObject.
false is returned here - the method is only redefined in JavaObject.
-
isJavaScriptClass
-
return true, if this is a javaScriptClass.
false is returned here - the method is only redefined in JavaScriptClass.
-
isJavaScriptMetaclass
-
return true, if this is a javaScript Metaclass.
false is returned here - the method is only redefined in JavaScriptMetaclass.
-
isKindOf: aClass
-
return true, if the receiver is an instance of aClass or one of its
subclasses, false otherwise.
Advice:
use of this to check objects for certain attributes/protocoll should
be avoided; it limits the reusability of your classes by limiting use
to instances of certain classes and fences you into a specific inheritance
hierarchy.
Use check-methods to check an object for a certain attributes/protocol
(such as #isXXXX, #respondsTo: or #isNumber).
Using #isKindOf: is considered BAD STYLE.
Advice2:
Be aware, that using an #isXXX method is usually much faster than
using #isKindOf:; because isKindOf: has to walk up all the superclass
hierarchy, comparing every class on the way.
Due to caching in the VM, a call to #isXXX is normally reached via
a single function call.
-
isLayout
-
return true, if the receiver is some kind of layout;
false is returned here - the method is only redefined in Layout.
-
isLazyValue
-
-
isLimitedPrecisionReal
-
return true, if the receiver is some kind of floating point number;
false is returned here - the method is only redefined in LimitedPrecisionReal.
-
isList
-
return true, if the receiver is some kind of list collection;
false is returned here - the method is only redefined in List.
-
isLiteral
-
return true, if the receiver can be represented as a literal constant in ST syntax;
false is returned here - the method is redefined in some classes.
-
isMemberOf: aClass
-
return true, if the receiver is an instance of aClass, false otherwise.
Advice:
use of this to check objects for certain attributes/protocol should
be avoided; it limits the reusability of your classes by limiting use
to instances of a certain class.
Use check-methods to check an object for a certain attributes/protocol
(such as #isXXX, #respondsTo: or #isNumber);
Using #isMemberOf: is considered BAD STYLE.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
-
isMeta
-
return true, if the receiver is some kind of metaclass;
false is returned here - the method is only redefined in Metaclass.
-
isMethod
-
return true, if the receiver is some kind of method;
false returned here - the method is only redefined in Method.
-
isMorph
-
return true, if the receiver is some kind of morph;
false is returned here - the method is only redefined in Morph.
-
isNameSpace
-
return true, if the receiver is a nameSpace.
False is returned here - the method is only redefined in Namespace.
-
isNamespace
-
return true, if this is a nameSpace.
false is returned here - the method is only redefined in Namespace.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
isNil
-
Return true, if the receiver is nil.
Because isNil is redefined in UndefinedObject,
the receiver is definitely not nil here, so unconditionally return false.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
-
isNilOrEmptyCollection
-
return true if I am nil or an empty collection - false here.
Obsolete, use isEmptyOrNil.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
isNonByteCollection
-
return true, if the receiver is some kind of collection, but not a String, ByteArray etc.;
false is returned here - the method is redefined in Collection and UninterpretedBytes.
-
isNumber
-
return true, if the receiver is some kind of number;
false is returned here - the method is only redefined in Number.
-
isOrderedCollection
-
return true, if the receiver is some kind of ordered collection (or list etc);
false is returned here - the method is only redefined in OrderedCollection.
-
isPoint
-
return true, if the receiver is some kind of point;
false is returned here - the method is only redefined in Point.
-
isPrinterContext
-
-
isProjectDefinition
-
return true, if the receiver is a projectDefinition.
False is returned here - the method is only redefined in ProjectDefinition.
-
isRealNameSpace
-
return true, if the receiver is really a nameSpace (i.e. a NameSpace, but not Smalltalk).
False is returned here - the method is only redefined in Namespace.
-
isRectangle
-
return true, if the receiver is some kind of rectangle;
false is returned here - the method is only redefined in Rectangle.
-
isRemoteObject
-
return true, if the receiver is some kind of remoteObject,
false if its local - the method is only redefined in RemoteObject.
-
isSequenceable
-
return true, if the receiver is some kind of sequenceable collection;
false is returned here - the method is only redefined in SequenceableCollection.
-
isSequenceableCollection
-
OBSOLETE: use isSequenceable for ST-80 compatibility.
This method is a historic leftover and will be removed soon ...
(although its name is much better than #isSequenceable - sigh)
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
isSharedPool
-
return true, if the receiver is a sharedPool.
False is returned here - the method is only redefined in SharedPool.
-
isStream
-
return true, if the receiver is some kind of stream;
false is returned here - the method is only redefined in Stream.
-
isString
-
return true, if the receiver is some kind of string;
false is returned here - the method is only redefined in CharacterArray.
-
isStringCollection
-
return true, if the receiver is some kind of stringCollection;
false is returned here - the method is only redefined in StringCollection.
-
isSymbol
-
return true, if the receiver is some kind of symbol;
false is returned here - the method is only redefined in Symbol.
-
isText
-
return true, if the receiver is some kind of text object;
false is returned here - the method is only redefined in Text.
-
isValueModel
-
return true, if the receiver is some kind of valueModel;
false is returned here - the method is only redefined in ValueModel.
-
isVariable
-
return true if the receiver has indexed instance variables,
false otherwise.
-
isVariableBinding
-
return true, if this is a binding for a variable.
false is returned here - the method is only redefined in Binding.
-
isView
-
return true, if the receiver is some kind of view;
false is returned here - the method is only redefined in View.
-
notEmptyOrNil
-
Squeak compatibility:
return true if I am neither nil nor an empty collection.
Return true here.
-
notNil
-
Return true, if the receiver is not nil.
Because notNil is redefined in UndefinedObject,
the receiver is definitely not nil here, so unconditionally return true.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
tracing
-
traceInto: aRequestor level: level from: referrer
-
double dispatch into tracer, passing my type implicitely in the selector
user interaction & notifications
-
activityNotification: aString
-
this can be sent from deeply nested methods, which are going to perform
some long-time activity.
If there is a handler for the ActivityNotificationSignal signal, that one is raised,
passing the argument. The handler should show this message whereever it likes,
and proceed. If there is no handler, this is simply ignored.
This is very useful to pass busy messages up to some higher level (typically a view)
which likes to display that message in its label or a busy-box.
It could also be put into some logfile or printed on the standard output/error.
-
confirm: aString
-
open a modal yes-no dialog.
Return true for yes, false for no.
If no GUI is present (headless applications), true is returned.
Someone in the sender chain may redefine the confirmation handler
by handling the UserConfirmation.
-
confirm: aString orCancel: cancelBlock
-
launch a confirmer, which allows user to enter yes, no or cancel.
return true for yes, false for no, or the value from cancelBlock for cancel.
If no GUI is present (headless applications), cancelBlock is returned.
-
confirmWithCancel: aString
-
launch a confirmer, which allows user to enter yes, no or cancel.
return true for yes, false for no, nil for cancel.
If no GUI is present (headless applications), nil is returned.
Someone in the sender chain may redefine the confirmation handler
by handling the UserConfirmation.
-
confirmWithCancel: aString defaultAnswer: defaultAnswerOrNil
-
launch a confirmer, which allows user to enter yes, no or cancel.
return true for yes, false for no, nil for cancel.
If no GUI is present (headless applications), nil is returned.
Someone in the sender chain may redefine the confirmation handler
by handling the UserConfirmation.
-
errorNotify: aString
-
launch a Notifier, showing top stack, telling user something
and give user a chance to enter debugger.
-
errorNotify: aString from: aContext
-
launch a Notifier, showing top stack (above aContext),
telling user something and give user a chance to enter debugger.
-
errorNotify: aString from: aContext allowDebug: allowDebug
-
launch a Notifier, showing top stack (above aContext),
telling user something and optionally give the user a chance to enter debugger.
-
information: aString
-
launch an InfoBox, telling user something.
These info-boxes can be suppressed by handling
UserNotification or InformationSignal and proceeding in the handler.
Use #notify: for more important messages.
If nobody handles the exception, the default action of UserNotification
pops up an info dialog.
-
notify: aString
-
launch a Notifier, telling user something.
Use #information: for ignorable messages.
If nobody handles the exception, the dafault action of UserNotification
pops up a warn dialog.
-
notifyTodo: msg position: position className: className selector: selector severity: severityOrSeveritySymbol priority: priorityOrPrioritySymbol equalityParameter: equalityParameter checkAction: checkAction
-
this is a message from the compiler system, to allow for a hook to remember
things to do. Can aslo used by other subsystems to add entries to the toDoList
-
warn: aString
-
launch a WarningBox, telling user something.
These warn-boxes can be suppressed by handling the
UserNotification- or WarningSignal and proceeding in the handler.
If nobody handles the exception, the dafault action of Warning
pops up a warn dialog.
visiting
-
acceptVisitor: aVisitor
-
double-dispatch onto a Visitor.
-
acceptVisitor: aVisitor with: aParameter
-
double-dispatch onto a Visitor.
Subclasses redefine this
AbstractBackground
AbstractBorder
AbstractChart
AbstractFTPSession
AbstractFileBrowser::Clipboard
AbstractFileBrowser::CodeExecutionLock
AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem
AbstractFileBrowser::SaveAspectItem
AbstractLauncherApplication::LauncherDialogs
AbstractOperatingSystem
AbstractOperatingSystem::PrinterInfo
AbstractOperatingSystem::TimeInfo
AbstractOperatingSystem::TimeZoneInfo
AbstractSourceCodeManager
AbstractSourceFileReader
AbstractSourceFileWriter
ActionButton
ActionButtonView
ActionMenu
Application
Archiver
Archiver::ArchiverOutputParser
AssistantPageSpec
Authentication::AuthenticationData
Authentication::Authenticator
Authentication::User
BTree::BTreeKeys
BTree::BTreeNode
Behavior
BinaryIOManager
BinaryObjectStorage
BinaryTreeNode
BindingReference
Boolean
BorderDecorator
CEnvironment
CallChain
Change
ChangeSet::ChangeFileReader
ChangeSet::DiffSet
ChangesBrowser::ChangeFileReader
CharacterAttributes
CharacterBlockScanner
CharacterEncoder
Class::ClassAttributes
Class::SimulatedClassPool
ClassBuilder
ClassCategoryReader
ClassOrganizer
CodeGeneratorTool
Collection
Color
Color::DeviceColorHandle
Comanche::Compiler
Comanche::HttpParser
Comanche::HttpResponse
Comanche::IdFormatter
Comanche::LineFormatter
Comanche::MIMEDocument
Comanche::MultipartChunk
Comanche::NetNameResolver
Comanche::NetworkRequest
Comanche::STTComancheModel
Comanche::STTModule
Comanche::STTTemplate
Comanche::SimulatedSqueakBlock
Comanche::SimulatedSqueakFileDirectory
Comanche::SimulatedSqueakFileStream
Comanche::SimulatedSqueakMethod
Comanche::SimulatedSqueakSocketStream
Comanche::SwikiColorScheme
Comanche::SwikiEntry
Comanche::SwikiFileServer
Comanche::SwikiModule
Comanche::SwikiRequest
Comanche::SwikiSchemeReadWriter
Comanche::SwikiSecurityMember
Comanche::SwikiSecurityModule
Comanche::SwikiSecurityPrivileges
Comanche::SwikiStorage
Comanche::SwikiStructure
Comanche::TextFormatter
CompilationErrorHandler
ComposedText
CompositionScanner
Context
Continuation
Controller
Cursor
CwDataInterchangeConverter
CwGlobalMemoryTransferMechanism
CwMainWindow
CwPrimitive
CwTransferMechanism
CwWidget
DNSMessage
DNSQuery
DNSRecord
DSVLabelView::LineDrag
DataSetColumn
DataSetColumnSpec
DataSetColumnSpec::EditorAndModel
DataSetLabel
DebugView::IgnoredHalt
Delay
Demos::WebDemoShop::Article
Demos::WebDemoShop::Customer
Demos::WebDemoShop::Order
Demos::WebDemoShop::Warehouse
Demos::WebDemoShopSessions::Article
Demos::WebDemoShopSessions::Customer
Demos::WebDemoShopSessions::Order
Demos::WebDemoShopSessions::Warehouse
Demos::WebSlideShow::CachedDirectoryEntry
Demos::WebSmalltalkBrowser::Arguments
DeviceHandle
DeviceWorkstation::DeviceFontMetrics
Dictionary::NilKey
DiffListUtility
DirectoryContents
DirectoryContents::DirectoryContentsItem
DirectoryContentsBrowser::DirectoryContentsItem
DisplayObject
DisplayScanner
DisplayTransform
DoWhatIMeanSupport
Dolphin::File
Dolphin::FileDialog
Dolphin::IXMLDOMDocument
Dolphin::IXMLDOMNamedNodeMap
Dolphin::SWEnvironment
Dolphin::SearchPolicy
Dolphin::SessionManager
Dolphin::SharedSet
DragAndDropManager
DragDropManager
DragDropManagerTracker
DragHandler
DrawAdaptor
DropContext
DropContext::DragType
DropObject
DropSource
DropTarget
EditTextView::EditAction
EditTextView::EditMode
EditTextView::LastReplacementInfo
EnterFieldGroup
ErrorDiffusion
EventListener
ExecutableFunction
ExternalAddress
ExternalLibrary
FCGI::FCGIHeader
FCGI::FCGIKeyValuePairs
FCGI::FCGIRecord
FTPServer
FileApplicationNoteBook::ArchiveViewApplication::ArchivItem
FileBrowserV2UISpecifications
FileOperation
FileSorter
Filename
Font::DeviceFontHandle
FontDescription
GapString
GenericException
GenericToolbarIconLibrary
Geometric
GraphicsContext
GraphicsDevice
GridBagConstraints
GridBagLayoutInfo
HTML::AbstractElement
HTML::AbstractTreeBuilder
HTML::CSS_AbstractStyleObject
HTML::HTMLParser
HTML::StyleVisitor
HTML::Visitor
HTMLDocGenerator
HTMLDocument
HTMLDocumentInterpreter
HTMLDocumentPainter::PainterState
HTMLDocumentPainter::TextStyle
HTMLFontStyle
HTMLPageStyle
HTMLParser
HTMLScriptEnvironment
HTMLTableCol
HTMLTableRow
HTMLUtilities
HTTPAccessLogger
HTTPConnection
HTTPCookie
HTTPFileService::CachedFileInfo
HTTPHeaderParser
HTTPInterface
HTTPInterface::HTTPResponse
HTTPInterface::KeptSocketInfo
HTTPRequest
HTTPRequest::MultipartChunk
HTTPResponse
HTTPResponseHeader
HTTPResponseHeader::CacheControl
HTTPServer
HTTPServerSettingsAppl::PluggableServicesSettingsAppl::ServiceItem
HTTPServerSettingsAppl::VirtualRootItem
HTTPService
HTTPService::NoRealmBehavior
HTTPServiceRequestContext
HTTPSession
HTTPTentativeObjectService::TemporaryLinkInfo
HierarchicalDropTargetController
HierarchicalItem
HierarchyNode
HistoryManager
HistoryManager::HistoryLine
HtmlSanitizer
HumanReadableImageGenerator
IOAccessor
Icon
Image
ImageFrame
ImageReader
InlineObject
InputState
InstrumentingCompiler::InstrumentationInfo
InstrumentingCompiler::MethodInvocationInfo::MethodInvocationInfoPerReceiverClass
InstrumentingCompiler::MethodInvocationInfo::MethodInvocationInfoPerReceiverClass::MethodInvocationInfoPerSendingMethod
Integer::ModuloNumber
InterestConverter
JavaScriptCompiler::LoopDescription
JavaScriptEnvironment
JavaScriptEnvironment::AppletObject
JavaScriptEnvironment::AppletsObject
JavaScriptEnvironment::Document
JavaScriptEnvironment::DocumentObject
JavaScriptEnvironment::FormFieldObject
JavaScriptEnvironment::FormObject
JavaScriptEnvironment::FormsObject
JavaScriptEnvironment::HistoryObject
JavaScriptEnvironment::Math
JavaScriptEnvironment::WindowObject
JavaScriptSourceReader
KeyboardForwarder
KeyboardProcessor
KeywordInContextIndexBuilder
Layout
Link
ListEntry
ListItemWrapper
ListModelView::Renderer
ListModelView::TableRenderer::ColumnDescriptor
ListView::HighlightArea
MIMETypeIconLibrary
MIMETypes
Magnitude
Math
MemoryPolicy
Menu
MenuBuilder
MenuItem
MenuPanel::Item
MenuPanel::Item::Adornment
MenuPanel::ScrollActivity
Message
MessageTally
MessageTracer
MessageTracer::MethodTimingInfo
Method::MethodWhoInfo
MethodFinder
MiniDebugger
MiniInspector
MockMedium
Model
Monitor
MultiImage
NVTClient
NameResolver
NameSpace
NameSpaceOrganizer
NewChangesBrowser::Change
NonInteractiveCompilerErrorHandler
NoteBookView::Tab
OSComposite
OSDialogBox
OSErrorHolder
OSProcess
ObjectFileHandle
ObjectFileLoader
ObjectMemory
ObjectMemory::BinaryModuleDescriptor
OpaqueImage
OrderedDither
PICTReader::PICTFrame
PackageId
PackageInfo
ParseErrorNode
ParseNode
ParserFlags
PassivityWrapper
PhoneticStringUtilities
PhoneticStringUtilities::NYSIISStringComparator
PhoneticStringUtilities::PhoneticStringComparator
PluginSupport
Preferences
PresenterStyleSheet
PrintConverter
PrintfScanf
ProcessMonitorV2::ProcessItem
ProcessorScheduler
ProfileTree
ProgramNodeBuilder
ProgramNodeEnumerator
ProgrammingLanguage
Project
Project::ClassInfo
Project::MethodInfo
ProjectDefinition
Promise
PrototypeLookupAlgorithm
QualifiedName
RBComment
RBParser
RBProgramNode
RBProgramNodeVisitor
RBToken
RIFFReader
RandomGenerator
RandomParkMiller
RandomTT800
RasterOp
ReadEvalPrintLoop
ReadMe::ST80_ReadMe
RecursionLock
Registry
RemoteImage
ReplyPresenter
ResourceRetriever
STCCompilerInterface
Scanner
Scanner::Comment
Scanner::Directive
ScheduledControllers
ScrollValueHolder
ScrollWrapper
SelectionTracker
Semaphore
SequenceableCollectionSorter
Set::EmptySlot
SftpClient
SftpClient::SftpHandle
SftpClient::SftpPacketBuilder
SharedPool
Signal
SimpleView::ViewShape
Singleton
Smalltalk
SocketAddressInfo
SourceCodeManagerUtilities
SourceFileLoader
Squeak::TextAnchor
Squeak::TextColor
Squeak::TextEmphasis
Squeak::TextFontChange
Squeak::TextURL
StandaloneStartup
StoreSourceCodeManager::DBInfo
Stream
StrikeFont
StringCollationPolicy
StringHolder
StringUtilities
Structure
SubChannelInfoSpec
SunRPC::PortMapperServer::Mapping
SunRPC::RPCDefinitions
SunRPC::RPCDefinitions::RPCAuth
SunRPC::RPCDefinitions::RPCCallHeader
SunRPC::RPCDefinitions::RPCReplyHeader
SunRPC::RPCEndPoint
SunRPC::ReadMe
SunRPC::SimulatedFile
SunRPC::SimulatedFileSystem
SunRPC::XDRCoder
SunRPC::XDRItem
SunRPC::XDRParser
SunRPC::XDRType
SunRPC::XDRType::EnumItem
SunRPC::XDRType::Field
Switch
SystemBrowser::BrowserHistoryEntry
SystemChangeNotifier
SystemDictionary
SystemOrganization
SystemOrganizer
SystemUtils
TSTree::TSTreeNode
TabWidget
TelnetClient
TextAttributes
TextLines
TextList
TextStyle
Timestamp::TimestampBuilderAbstract
ToolApplicationModel::HistoryEntry
Tools::BreakpointBrowser::BreakpointListEntry
Tools::ClassChecker
Tools::CodeCritics
Tools::MethodCategoryCache
Tools::MethodCategoryList::CachedMethodInfo
Tools::NavigationState
Tools::ToDoListEntry
TreeItem
TriggerButtonController
UILookPolicy
UIPalette
UISpecVisitor
UISpecification
URI
URITransmission
URITransmissionService
URITransmissionServiceAppl::TransmissionRow
URL
UndefinedObject
UndefinedVariable
UndoSupport
UndoSupport::CompoundAction
UnitConverter
UnixOperatingSystem::FileDescriptorHandle
UnixOperatingSystem::FileStatusInfo
UnixOperatingSystem::MountInfo
UnixOperatingSystem::OSProcessStatus
UnixProcess
UserMessage
Utilities
V::ApplicationCoordinator
V::Dynalink32
V::GDIDLL
V::GraphPane
V::OLEControlSitePane
V::OLEStructure
V::ViewManager
Variable
VersionInfo
Visitor
WidgetWrapper
Win32FileDialog
Win32Shell
WindowBuilder
WindowGroup
WindowSensor
WindowingTransformation
XML::AttributeDef
XML::AttributeType
XML::DocumentType
XML::ElementContext
XML::FastSAXDriver
XML::Node
XML::NodeTag
XML::Pattern
XML::SAXDriver
XML::SAXLocator
XML::URIResolver
XML::XMLNodeBuilder
XML::XMLParser
XMLStandardDecoder::AbstractConverter
ZipArchive
ZipArchive::ZipCentralDirectory
ZipArchive::ZipMember
|