|
Class: Object
nil
|
+--Object
|
+-- ... almost every other class ...
- Package:
- stx:libbasic
- Category:
- Kernel-Objects
- Version:
- rev:
1.1117
date: 2024/04/23 19:08:51
- user: cg
- file: Object.st directory: libbasic
- module: stx stc-classLibrary: libbasic
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.
copyrightCOPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
dependenciesST/X dependencies are slightly modified from ST-80's
(we think they are better ;-).
One problem occuring very often in ST-80 is that some object
cannot be garbage collected because some dependency is present,
having the object as a dependent of some other object.
In ST-80, this association remains alive (because a Dictionary
is used to hold dependents) - even if no other references exist to
to dependent or the dependee.
This means, that in ST-80, a #release is mandatory in order to
prevent memory leaks.
We think, that this is a bad solution, since after all, exactly that
kind of work should be performed by a garbage collector - you should not
need to care about dependencies.
From a philosophical point of view, why should some object depend on
something that the programmer considers a dead object ?
(well - worse than that: it seems that some ST-80 code even depends on
that behavior)
In order to limit the trouble, ST-80 reimplemented the way dependents
are stored in the model class - this one keeps the dependents locally,
so these dependents go away, once the model is reclaimed.
That may make things even more confusing: with models, no #release is
needed, with general objects it is mandatory.
In ST/X, dependencies are implemented using a WeakDictionary; this means,
that once the dependee dies, the dependency association is removed automatically,
and the dependent can be reclaimed by the garbage collector, if no other
references exist to the dependent.
In order to (at least) provide a mechanism for the old behavior
(in case your application heavily depends on the ST-80 mechanism), complementary
protocol to add nonWeak dependencies is provided
(see #addNonWeakDependent / #removeNonWeakDependent).
Caveat:
since interests are implemented using InterestConverter (which are simply
forwarding messages), these must use the nonWeak mechanism (as done in ST-80
automatically).
The reason is that there are usually no direct references to the converters,
and those would be reclaimed if stored in a weakDictionary.
This means, that those interests MUST be removed with #retractInterest
(which is bug-compatible to ST-80).
We rewrite things to provide a more convenient mechanism in the future ...
I like to hear comments on the above - do you think its better ?
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
-
ambiguousMessageSignal
-
return the signal used for ambiguousMessage: - error handling
-
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).
This now returns ElementBoundsError (class based exception)
and this method is only provided for portability
(old Smalltalk versions used a signal instance here).
You can savely use ElementBoundsError directly.
-
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.
This now returns IndexNotFoundError (class based exception)
and this method is only provided for portability
(old Smalltalk versions used a signal instance here).
You can savely use IndexNotFoundError directly.
-
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.
This now returns KeyNotFoundError (class based exception)
and this method is only provided for portability
(old Smalltalk versions used a signal instance here).
You can savely use KeyNotFoundError directly.
-
messageNotUnderstoodSignal
-
return the signal used for doesNotUnderstand: - error handling.
This now returns MessageNotUnderstood (class based exception)
and this method is only provided for portability
(old Smalltalk versions used a signal instance here).
You can savely use MessageNotUnderstood directly.
-
nonIntegerIndexSignal
-
return the signal used for bad subscript error reporting.
This now returns NonIntegerIndexError (class based exception)
and this method is only provided for portability
(old Smalltalk versions used a signal instance here).
You can savely use NonIntegerIndexError directly.
-
notFoundSignal
-
return the signal used for no element found error reporting.
This now returns NotFoundError (class based exception)
and this method is only provided for portability
(old Smalltalk versions used a signal instance here).
You can savely use NotFoundError directly.
-
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.
This now returns PrimitiveFailure (class based exception)
and this method is only provided for portability
(old Smalltalk versions used a signal instance here).
You can savely use PrimitiveFailure directly.
-
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
-
deprecated - use SubclassResponsibilityError.
obsolete to not show up in selector completion.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
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
Usage example(s):
-
initialize
-
called only once - initialize signals
Usage example(s):
initialize InfoPrinting to the VM's infoPrint setting
|
Usage example(s):
queries
-
isAbstract
-
Return if this class is an abstract class.
True is returned for Object here; false for subclasses.
Abstract subclasses must redefine this 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.
restore errors
-
errorRecursiveStore
-
invoked, when trying to restore a #storeString, that could not be constructed
due to recursive contents.
Instead of the non-restorable object with cycles, a default dummy object is restored.
If handled, the handler detrmins the returned object.
Compatibility-Dolphin
-
stbFixup: anSTBInFiler at: newObjectIndex
( an extension from the stx:libcompat package )
-
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
( an extension from the stx:libbasic2 package )
-
-
trigger: anAspect with: anArgument
( an extension from the stx:libbasic2 package )
-
-
when: anAspect sendTo: anObject
( an extension from the stx:libbasic2 package )
-
Compatibility-GNU
-
display
-
print the receiver on the standard output stream (which is not the Transcript).
Added for GNU-ST compatibility
-
displayNl
-
print the receiver followed by a cr on the standard output stream (which is not the Transcript).
Added for GNU-ST compatibility
-
errorPrintNL
-
print the receiver followed by a cr on the standard error stream.
Please use #errorPrintCR - this method exists for backward compatibility
(and also for Squeak/GNUSmalltalk compatibility).
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
errorPrintNewline
-
print the receiver followed by a cr on the standard error stream.
Please use #errorPrintCR - this method exists for backward compatibility.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
infoPrintNL
-
print the receiver followed by a cr on the standard error stream.
Please use #infoPrintCR - this method exists for backward compatibility
(and also for Squeak/GNUSmalltalk compatibility).
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
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) **
-
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) **
-
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) **
Compatibility-ST/V
-
implementedBySubclass
( an extension from the stx:libcompat package )
-
this is sent by ST/V code - it's the same as #subclassResponsibility
-
invalidMessage
( an extension from the stx:libcompat package )
-
this is sent by ST/V code - it is the same as #shouldNotImplement
Compatibility-ST80
-
isMetaclass
-
same as isMeta for ST80/Squeak and VW compatibility.
kept in the libbasic package, because it is used often
Compatibility-Squeak
-
becomeForward: anotherObject
( an extension from the stx:libcompat package )
-
same as becomeSameAs:, but Squeak naming
-
becomeForward: anotherObject copyHash: copyHash
( an extension from the stx:libcompat package )
-
-
caseError
( an extension from the stx:libcompat package )
-
Report an error from an in-line or explicit case statement.
-
caseOf: cases
( an extension from the stx:libcompat package )
-
The elements of cases are associations between blocks.
Answer the evaluated value of the first association in cases
whose evaluated key equals the receiver.
If no match is found, report an error.
Usage example(s):
possible, but not inline compiled (i.e. slow)
| z |
z := {
[#a]->[1+1].
['b' asSymbol]->[2+2].
[#c]->[3+3]
}.
#b caseOf: z.
z := {
[#a]->[1+1].
['d' asSymbol]->[2+2].
[#c]->[3+3]
}.
#b caseOf: z
|
Usage example(s):
The following are compiled in-line (in the BytecodeCompiler:
#b caseOf: {
[#a]->[1+1].
['b' asSymbol]->[2+2].
[#c]->[3+3]
}.
#b caseOf: {
[#a]->2.
['d' asSymbol]->3.
[#c]->4
}.
|
-
caseOf: cases otherwise: otherwise
( an extension from the stx:libcompat package )
-
The elements of cases are associations between blocks.
Answer the evaluated value of the first association in cases
whose evaluated key equals the receiver.
If no match is found, answer the result
of evaluating the otherwise block.
Usage example(s):
| z |
z := {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}.
#b caseOf: z otherwise: [0].
z := {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}.
#b caseOf: z otherwise: [0]
|
Usage example(s):
The following are compiled in-line (in the BytecodeCompiler:
#b caseOf: {
[#a]->[1+1].
['b' asSymbol]->[2+2].
[#c]->[3+3]
} otherwise: [0].
#b caseOf: {
[#a]->2.
['d' asSymbol]->4.
[#c]->9
} otherwise: [999]
|
Usage example(s):
|x|
x := 1.
x caseOf: {
[1]->['one'].
[2]->['two'].
[3]->['three']
}
otherise:[nil].
x := 2.
x caseOf: {
1->'one'.
2->'two'.
3->'three'
}
otherwise:nil.
|
-
comeFullyUpOnReload: smartRefStream
( an extension from the stx:libcompat package )
-
Normally this read-in object is exactly what we want to store. 7/26/96 tk
-
deepFlattenInto: stream
( an extension from the stx:libcompat package )
-
-
deprecated: aMessage
( an extension from the stx:libcompat package )
-
somehow, the Squeak guys came to the same conclusion, that obsolete stuff needs to be marked as such.
However (as usual), they invent their own naming, not looking what others have already invented (sigh).
For Squeak code, this forwards the notification to our ST/X mechanism
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
explore
( an extension from the stx:libcompat package )
-
-
hasProperty: propertyKey
( an extension from the stx:libcompat package )
-
return true if the property for a given key exists.
Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.
-
in: aBlock
( an extension from the stx:libcompat package )
-
evaluate aBlock, passing the receiver as arg
-
inform: aString
( an extension from the stx:libcompat package )
-
Display a message for the user to read and then dismiss.
Usage example(s):
-
isCompiledMethod
-
same as isMethod - for squeak compatibility
-
isInMemory
( an extension from the stx:libcompat package )
-
All normal objects are.
-
objectForDataStream: stream
( an extension from the stx:libcompat package )
-
-
perform: selector withEnoughArguments: anArray
( an extension from the stx:libcompat package )
-
Send the selector, aSymbol, to the receiver with arguments in argArray.
Only use enough arguments for the arity of the selector; supply nils for missing ones.
Note: This method is from Pharo 1.4 - do not use in Smalltalk/X code
-
properties
( an extension from the stx:libcompat package )
-
return a collection of properties - nil if there is none.
Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.
The default implementation here uses a global WeakDictionary to store properties
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.
-
properties: aCollection
( an extension from the stx:libcompat package )
-
set the collection of properties.
Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.
The default implementation here uses a global Dictionary to store
properties which may be too slow for high frequency change&update.
Therefore, some classes may redefine this for better performance.
-
propertyAt: propertyKey
( an extension from the stx:libcompat package )
-
return the property for a given key or raise an error if not found.
Such propertys behave like dynamically addable slots in languages like JavaScript.
They are much more expensive though, because they are not a ''natural'' mechanism in Smalltalk,
but instead simulated via an additional properties collection mechanism, which
defaults to using a dictionary holding per instance properties.
So only use it for seldom needed/seldom assigned properties,
and only if it is not easy to add an instance variable or class-private mechanism for that.
Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.
-
propertyAt: propertyKey ifAbsent: defaultValue
( an extension from the stx:libcompat package )
-
return the property for a given key or defaultValue if not present.
Such propertys behave like dynamically addable slots in languages like JavaScript.
They are much more expensive though, because they are not a ''natural'' mechanism in Smalltalk,
but instead simulated via an additional properties collection mechanism, which
defaults to using a dictionary holding per instance properties.
So only use it for seldom needed/seldom assigned properties,
and only if it is not easy to add an instance variable or class-private mechanism for that.
Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.
-
propertyAt: propertyKey ifAbsentPut: defaultValue
( an extension from the stx:libcompat package )
-
return the property for a given key or the added defaultValue if not present.
Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.
Usage example(s):
|o|
o := Point new.
o hasProperty:#foo.
o propertyAt:#foo ifAbsentPut:['fooString'].
o hasProperty:#foo.
o propertyAt:#foo.
o propertyAt:#foo ifAbsent:99.
|
-
propertyAt: propertyKey put: anObject
( an extension from the stx:libcompat package )
-
store the property anObject referenced by key into the receiver.
Such propertys behave like dynamically addable slots in languages like JavaScript.
They are much more expensive though, because they are not a ''natural'' mechanism in Smalltalk,
but instead simulated via an additional properties collection mechanism, which
defaults to using a dictionary holding per instance properties.
So only use it for seldom needed/seldom assigned properties,
and only if it is not easy to add an instance variable or class-private mechanism for that.
Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.
-
readDataFrom: aDataStream size: varsOnDisk
( an extension from the stx:libcompat package )
-
Fill in the fields of self based on the contents of aDataStream. Return self.
Read in the instance-variables written by Object>>storeDataOn:.
NOTE: This method must send beginReference: before reading any objects from aDataStream that might reference it.
Allow aDataStream to have fewer inst vars. See SmartRefStream.
Usage example(s):
If we ever return something other than self, fix calls
on (super readDataFrom: aDataStream size: anInteger)
|
-
removeProperty: propertyKey
( an extension from the stx:libcompat package )
-
remove an object property;
return the value previously stored there, or nil.
(make the argument, anObject be no longer an property of the receiver).
Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.
-
sizeInMemory
( an extension from the stx:libcompat package )
-
^ self byteSize
Usage example(s):
#[1] sizeInMemory
#[1 2] sizeInMemory
|
-
storeDataOn: aDataStream
( an extension from the stx:libcompat package )
-
Store myself on a DataStream.
Answer self.
This is a low-level DataStream/ReferenceStream method.
See also objectToStoreOnDataStream.
NOTE: This method must send 'aDataStream beginInstance:size:' and then (nextPut:/nextPutWeak:) its subobjects.
readDataFrom:size: reads back what we write here.
-
stringForReadout
( an extension from the stx:libcompat package )
-
-
stringRepresentation
( an extension from the stx:libcompat package )
-
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
-
veryDeepCopy
( an extension from the stx:libcompat package )
-
Compatibility-VW
-
isCharacters
-
true, if the receiver is a string-like thing.
added for visual works compatibility
-
isSignalledException
-
VW compatibility
-
keyNotFoundError: aKey
-
VW compatibility
-
oneWayBecome: anotherObject
( an extension from the stx:libcompat package )
-
|arr o1 o2|
arr := Array new:2.
arr at:1 put:(o1 := Object new).
arr at:2 put:(o2 := Point new).
o1 oneWayBecome:o2.
(arr at:1) ~~ o2 ifTrue:[self halt].
Javascript support
-
js_addFromString: aString
( an extension from the stx:libjavascript package )
-
For JavaScript only:
Generated for +-operator in javascript.
-
js_asBoolean
( an extension from the stx:libjavascript package )
-
-
js_at: index
( an extension from the stx:libjavascript package )
-
JS uses 0-based indexing
-
js_at: row at: col
( an extension from the stx:libjavascript package )
-
JS uses 0-based indexing
-
js_at: idx1 at: idx2 at: idx3
( an extension from the stx:libjavascript package )
-
JS uses 0-based indexing
-
js_at: idx1 at: idx2 at: idx3 put: something
( an extension from the stx:libjavascript package )
-
JS uses 0-based indexing
-
js_at: row at: col put: something
( an extension from the stx:libjavascript package )
-
JS uses 0-based indexing
-
js_at: index put: something
( an extension from the stx:libjavascript package )
-
JS uses 0-based indexing
-
js_await
( an extension from the stx:libjavascript package )
-
for JavaScript, so that it is different from a value call
and can be back-xlated to an await.
Return the value of the promise.
If the evaluation process has not yet finished, wait for it.
Otherwise return the value immediately.
Any exception which occurred during the evaluation is forwarded to the
requestor of the value here.
-
js_length
( an extension from the stx:libjavascript package )
-
-
js_new
( an extension from the stx:libjavascript package )
-
redefinable JS-new (for datatypes and ctypes, this is required in the inst side
-
js_new: size
( an extension from the stx:libjavascript package )
-
redefinable JS-new (for datatypes and ctypes, this is required in the inst side
-
js_toString
( an extension from the stx:libjavascript package )
-
JavaScriptParser evaluate:'''hello''.toString()'
-
js_typeof
( an extension from the stx:libjavascript package )
-
return a string describing what I am
-
js_valueOf
( an extension from the stx:libjavascript package )
-
as a fallback, return myself
accessing
-
_at: index
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx] is parsed.
I.e.
foo[n]
generates
foo _at: n
-
_at: index1 at: index2
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx] is parsed.
I.e.
foo[n][m]
generates
foo _at:n at:m
here, fallback to a send as if (self at:index1)[index2] was coded
(notice: must call _at: to the fetched element.
-
_at: index1 at: index2 at: index3
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx...] is parsed.
I.e.
foo[n][m][o]
generates
foo _at:n at:m at:o
here, fallback to a send as if (self at:index1)[index2][index3] was coded
(notice: must call _at:at: to the fetched element.
-
_at: index1 at: index2 at: index3 put: val
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx...] := val is parsed.
I.e.
foo[n][m][o] := val
generates
foo _at:n at:m at:o put:val
here, fallback to a send as if (self at:index1)[index2][index3] put:val was coded
(notice: must call _at:at:put: to the fetched element.
-
_at: index1 at: index2 put: val
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx...] := val is parsed.
I.e.
foo[n][m] := val
generates
foo _at:n at:m put:val
here, fallback to a send as if (self at:index1)[index2] put:val was coded
(notice: must call _at:put: to the fetched element.
-
_at: index put: val
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx...] := val is parsed.
I.e.
foo[n] := val
generates
foo _at:n put:val
-
addSlot: slotName
-
dynamically add a new slot to the receiver.
The receiver must be a real object, not nil or a SmallInteger
Usage example(s):
|p1 p2 p3|
p1 := Point x:10 y:20.
p2 := Point x:100 y:200.
Transcript show:'p1 is '; showCR:p1.
Transcript show:'p2 is '; showCR:p2.
p1 addSlot:'z'.
p1 z:30.
Transcript show:'p1 is '; showCR:p1.
Transcript show:'p2 is '; showCR:p2.
ObjectMemory dumpObject:p1.
ObjectMemory dumpObject:p2.
p1 addSlot:'t'.
p1 t:30.
Transcript show:'p1 is '; showCR:p1.
ObjectMemory dumpObject:p1.
p3 := Point x:110 y:120.
p3 addSlot:'z'.
p3 addSlot:'t'.
p1 inspect.
p2 inspect.
p3 inspect.
|
-
at: index
-
return the indexed instance variable with index, anInteger;
this method can be redefined in subclasses.
-
at: index ifAbsent: exceptionalValue
-
return the indexed instance variable with index, anInteger.
If there is no such key, return the value from exceptionalValue.
This method is usually 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 receiver's indexed instvars are treated as an uninterpreted
collection of bytes.
Only useful with binary storage.
Usage example(s):
Point new byteAt:1
(ByteArray with:1 with:2) byteAt:2
(WordArray with:1) byteAt:1
(WordArray with:1) byteAt:2
(FloatArray with:1.0) byteAt:2
'hello' byteAt:1
|
-
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 receiver's indexed instvars are treated as an uninterpreted
collection of bytes.
Only useful with binary storage.
Usage example(s):
(ByteArray with:1 with:2) byteAt:2 put:3; yourself
'hello' copy byteAt:1 put:105; yourself
|
-
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)
Usage example(s):
|p|
p := Point x:10 y:20.
p instVarNamed:'cx'
|
-
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)
Usage example(s):
|p|
p := Point x:10 y:20.
p instVarNamed:'x'
|
-
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)
Usage example(s):
|p|
p := Point x:10 y:20.
p instVarNamed:'x' put:30.
p
|
-
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)
Usage example(s):
|p|
p := Point x:10 y:20.
p instVarNamed:'x' put:4711 ifAbsent:[self halt:'no such instvar'].
p instVarNamed:'bla' put:4712 ifAbsent:[self halt:'no such instvar'].
p inspect.
|
-
nilAllInstvars
-
overwrite all inst vars of the object with nil.
Used by the crypto package to clear objects with
keys when no longer in use.
Usage example(s):
'abcdef' copy nilAllInstvars
100 factorial nilAllInstvars
|
attributes access
-
objectAttributeAt: attributeKey
-
return the attribute for a given key or nil if not found.
Such attributes behave like dynamically addable slots in languages like JavaScript.
They are much more expensive though, because they are not a ''natural'' mechanism in Smalltalk,
but instead simulated via an additional objectAttributes collection mechanism, which
defaults to using a dictionary holding per instance attributes.
So only use it for seldom needed/seldom assigned attributes,
and only if it is not easy to add an instance variable or class-private mechanism for that.
-
objectAttributeAt: attributeKey ifAbsent: defaultValue
-
return the attribute for a given key or defaultValue if not present.
Such attributes behave like dynamically addable slots in languages like JavaScript.
They are much more expensive though, because they are not a ''natural'' mechanism in Smalltalk,
but instead simulated via an additional objectAttributes collection mechanism, which
defaults to using a dictionary holding per instance attributes.
So only use it for seldom needed/seldom assigned attributes,
and only if it is not easy to add an instance variable or class-private mechanism for that.
-
objectAttributeAt: attributeKey put: anObject
-
store the attribute anObject referenced by key into the receiver.
Such attributes behave like dynamically addable slots in languages like JavaScript.
They are much more expensive though, because they are not a ''natural'' mechanism in Smalltalk,
but instead simulated via an additional objectAttributes collection mechanism, which
defaults to using a dictionary holding per instance attributes.
So only use it for seldom needed/seldom assigned attributes,
and only if it is not easy to add an instance variable or class-private mechanism for that.
Usage example(s):
Attaching additional attributes (slots) to an arbitrary object:
|p|
p := Point new.
p objectAttributeAt:#color put:#green.
p objectAttributeAt:#color
|
-
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
-
remove an object attribute;
return the value previously stored there, or nil.
(make the argument, anObject be no longer an attribute of the receiver)
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 an '#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:
-
updateFrom: changedObject
-
I am notified of some change in changedObject
Default is to update:with:from:
-
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
if it returns true. The dependents 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 is a simple updateRequest
-
updateRequest: aSymbol with: aParameter from: sender
-
return true if an update request is granted.
Default here is a simple updateRequest
-
withoutUpdating: someone do: aBlock
-
evaluate a block but remove someone from my dependents temporarily
comanche
-
asHtmlDocumentForRequest: aNetworkRequest
( an extension from the stx:goodies/webServer/comanche package )
-
-
asHtmlElement
( an extension from the stx:goodies/webServer/comanche package )
-
answer my HTML representation (String),
as I would look like inside an HTML document
-
asHtmlElementIn: htmlContainer
( an extension from the stx:goodies/webServer/comanche package )
-
answer my HTML representation (String),
as I would look like inside htmlContainer
-
asHttpResponseTo: anHttpRequest
( an extension from the stx:goodies/webServer/comanche package )
-
-
comancheUrl
( an extension from the stx:goodies/webServer/comanche package )
-
-
makeAvailableInComanche
( an extension from the stx:goodies/webServer/comanche package )
-
force putting the object on the ObjUrlMap list
-
mimeType
( an extension from the stx:goodies/webServer/comanche package )
-
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
Usage example(s):
#(1 2 3 4) deepSameContentsAs:#[1 2 3 4] asArray
(1@2) deepSameContentsAs:(1->2)
|
-
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)
-
hashOfContents
-
answer the hash for objects that implement equality via #sameContentsAs:
Usage example(s):
#(1 2 3 4) hashOfContents
(1@2) hashOfContents
#() hashOfContents
nil hashOfContents
|
-
identicalContentsAs: 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.
Identity compare (instead of euqlity compare) is used.
Usage example(s):
#(1 2 3 4) identicalContentsAs:#[1 2 3 4]
(1@2) identicalContentsAs:(1->2)
(1.0@2) identicalContentsAs:(1->2)
|
-
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.
Equality compare (instead of identity compare) is used (as in subclasses).
Usage example(s):
#(1 2 3 4) sameContentsAs:#[1 2 3 4]
(1@2) sameContentsAs:(1->2)
(1.0@2) sameContentsAs:(1->2)
|
-
~= 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 receiver's class is not aSimilarClass,
create and return an instance of aSimilarClass that has the same contents
as the receiver.
Otherwise, return the receiver.
Usage example(s):
#[1 2 3 4] as:ByteArray
#[1 2 3 4] as:Array
#[1 2 3 4] as:Set
#[1 2 3 4 1 2] as:Bag
#('1' '2' '3' '4') as:StringCollection
#[81 82 83 84] as:String
#[81 82 83 84] as:Symbol
'hello' as:Unicode16String
|
-
asCollection
-
return myself as a Collection.
Redefined in collection to return themself.
-
asDoubleLink
( an extension from the stx:libbasic2 package )
-
return a valueDoubleLink for the receiver.
Used to make sure the receiver can be added to a double linked list
-
asLink
( an extension from the stx:libbasic2 package )
-
return a valueLink for the receiver.
Used to make sure the receiver can be added to a linked list
-
asPlainString
-
return myself as a plain string without any emphasis.
-
asSequenceableCollection
-
return myself as a SequenceableCollection.
Redefined in SequenceableCollection
-
asString
-
-
asValue
( an extension from the stx:libview2 package )
-
return a valueHolder for the receiver
-
asValueWithDependent: aDependent
( an extension from the stx:libview2 package )
-
return a valueHolder for the receiver,
and make aDependent dependent of it
copying
-
clone
-
Return a clone-copy of the receiver
-
cloneFrom: anObject
-
Helper for copy:
copy all instance variables from anObject into the receiver,
which should be of the same class as the argument.
Usage example(s):
|x|
x := Array new:3.
x cloneFrom:#(1 2 3).
|
-
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).
Usage example(s):
Class withoutUpdatingChangesDo:[
|point3D|
point3D := Point subclass:#Point3D
instanceVariableNames:'z'
classVariableNames:''
poolDictionaries:''
category:'testing'
inEnvironment:nil.
(point3D new cloneInstanceVariablesFrom:1@2) inspect.
]
|
Usage example(s):
Class withoutUpdatingChangesDo:[
Point variableSubclass:#Point3D_test
instanceVariableNames:'z'
classVariableNames:''
poolDictionaries:''
category:'testing'.
(((Smalltalk at:#Point3D_test) new:2) cloneInstanceVariablesFrom:#(1 2 3)) inspect.
]
|
Usage example(s):
|someObject|
Class withoutUpdatingChangesDo:[
Object subclass:#TestClass1
instanceVariableNames:'foo bar'
classVariableNames:''
poolDictionaries:''
category:'testing'.
someObject := TestClass1 new.
someObject instVarAt:1 put:'foo'; instVarAt:2 put:'bar'.
Object subclass:#TestClass2
instanceVariableNames:'bar foo'
classVariableNames:''
poolDictionaries:''
category:'testing'.
(TestClass2 new cloneInstanceVariablesFrom:someObject) inspect.
]
|
Usage example(s):
|top b b1|
top := StandardSystemView new.
top extent:100@100.
b := Button in:top.
b label:'hello'.
b1 := ArrowButton new cloneInstanceVariablesFrom:b.
top open.
b1 inspect
|
-
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.
Usage example(s):
|a b|
a := #(
'1.1'
'1.2'
'1.3'
(
'1.41'
'1.42'
'1.43'
(
'1.441'
'1.442'
'1.443'
( '1.4441' '1.4442' '1.4443' )
'1.445'
)
'1.45'
)
'1.5'
).
b := a copyToLevel:1.
self assert: ( (a at:1) == (b at:1) ).
self assert: ( (a at:4) == (b at:4) ).
b := a copyToLevel:2.
self assert: ( (a at:1) ~~ (b at:1) ).
self assert: ( (a at:4) ~~ (b at:4) ).
self assert: ( ((a at:4) at:1) == ((b at:4) at:1) ).
self assert: ( ((a at:4) at:4) == ((b at:4) at:4) ).
b := a copyToLevel:3.
self assert: ( (a at:1) ~~ (b at:1) ).
self assert: ( (a at:4) ~~ (b at:4) ).
self assert: ( ((a at:4) at:1) ~~ ((b at:4) at:1) ).
self assert: ( ((a at:4) at:4) ~~ ((b at:4) at:4) ).
self assert: ( (((a at:4) at:4) at:1) == (((b at:4) at:4)at:1) ).
self assert: ( (((a at:4) at:4) at:4) == (((b at:4) at:4)at:4) ).
|
-
copyTwoLevel
-
one more level than a shallowCopy
Usage example(s):
|original copy elL1 elL2 elL3 copyOfElL1|
original := Array new:3.
original at:1 put:1234.
original at:2 put:'hello'.
original at:3 put:(elL1 := Array new:3).
elL1 at:1 put:1234.
elL1 at:2 put:'hello'.
elL1 at:3 put:(elL2 := Array new:3).
elL2 at:1 put:1234.
elL2 at:2 put:'hello'.
elL2 at:3 put:(elL3 := Array new:3).
elL3 at:1 put:1234.
elL3 at:2 put:'hello'.
elL3 at:3 put:(Array new:3).
copy := original copyTwoLevel.
self assert:((original at:2) ~~ (copy at:2)).
self assert:((original at:3) ~~ (copy at:3)).
copyOfElL1 := copy at:3.
self assert:((elL1 at:2) == (copyOfElL1 at:2)).
self assert:((elL1 at:3) == (copyOfElL1 at:3)).
|
-
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 receiver's 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.
Usage example(s):
|a|
a := Color black onDevice:Screen current.
a deepCopy inspect
|
-
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.
-
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.
Usage example(s):
|a|
a := Array new:3.
a at:3 put:a.
a simpleDeepCopy
|
-
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.
copying-private
-
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
debugging
-
assert: aBooleanOrBlock
-
fail and report an error, if the argument does not evaluate to true
Usage example(s):
self assert:false
self assert:[false]
|
-
assert: aBooleanOrBlock description: messageIfFailing
-
fail, if the argument does not evaluate to true and report an error
Usage example(s):
self assert:false description:'xxx'
|
-
assert: aBooleanOrBlock message: messageIfFailing
-
fail, if the argument does not evaluate to true and report an error
Usage example(s):
self assert:false message:'xxx'
self assert:[true] message:'xxx'
self assert:[false] message:'xxx'
|
-
assertNotNil
-
fail and report an error, if the receiver is nil
Usage example(s):
-
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
Usage example(s):
don't send #breakPoint:info: here - ask cg why.
|
Usage example(s):
nil breakPoint:#stefan
nil breakPoint:#stefan info:'Hello'
Smalltalk enableBreakPoint:#stefan.
Smalltalk disableBreakPoint:#stefan.
EncounteredBreakPoints.
Smalltalk enableBreakPoint:#cg.
Smalltalk disableBreakPoint:#cg.
Smalltalk enableBreakPoint:#expecco.
Smalltalk disableBreakPoint:#cg.
|
-
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
-
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
Usage example(s):
Smalltalk disableBreakPoint:#cg.
nil debuggingCodeFor:#cg is:[ Transcript showCR:'here is some debug message for cg' ].
nil debuggingCodeFor:#stefan is:[ Transcript showCR:'here is some debug message for sv' ].
Smalltalk enableBreakPoint:#cg.
nil debuggingCodeFor:#cg is:[ Transcript showCR:'here is some debug message for cg' ].
nil debuggingCodeFor:#stefan is:[ Transcript showCR:'here is some debug message for sv' ].
Smalltalk disableBreakPoint:#cg.
|
-
disableAllBreakPoints
-
disable all parametrized breakPoints (with any key as parameter)
Usage example(s):
nil enableBreakPoint:#cg.
nil breakPoint:#cg.
nil disableAllBreakPoints.
nil breakPoint:#cg.
|
-
disableBreakPoint: someKey
-
disable parametrized breakPoints with someKey as parameter
Usage example(s):
nil enableBreakPoint:#cg.
nil breakPoint:#cg.
nil disableBreakPoint:#cg
nil breakPoint:#cg.
|
-
enableBreakPoint: someKey
-
enable parametrized breakPoints with someKey as parameter
Usage example(s):
nil enableBreakPoint:#cg.
nil breakPoint:#cg.
nil disableBreakPoint:#cg
nil breakPoint:#cg.
|
-
halt
-
enter debugger with halt-message.
The error is reported by raising the HaltSignal exception.
Usage example(s):
enter debugger with halt-message.
The error is reported by raising the HaltSignal exception.
|
Usage example(s):
don't send #halt: here - ask cg why.
|
Usage example(s):
-
halt: aString
-
enter debugger with halt-message.
The error is reported by raising the HaltSignal exception.
-
haltIfNil
-
halt if the receiver is nil
Usage example(s):
3 haltIfNil
nil haltIfNil
|
-
haltIfNotNil
-
halt if the receiver is not nil
Usage example(s):
3 haltIfNotNil
nil haltIfNotNil
|
-
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 ...
-
newInspector2Tab
( an extension from the stx:libtool package )
-
return an extra tab to be used inside an inspector
-
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.
Usage example(s):
Object obsoleteFeatureWarning:'foo' from:thisContext sender sender
|
-
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: messageOrNil 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.
Usage example(s):
Object obsoleteMethodWarning:'foo' from:thisContext sender sender
|
-
todo
-
used to mark code pieces that have to be implemented.
Halts when reached in development mode;
ignored in deployed production code.
-
todo: aBlock
-
used to mark code pieces that have to be implemented.
The coe in aBlock is ignored.
-
tracePoint: someKey
-
Like transcript show, but disabled by default.
Can be easily enabled.
Can be filtered on the arguments value (typically: a symbol).
Code with tracepoints may be even checked into the source repository
Usage example(s):
nil tracePoint:#stefan
nil tracePoint:#stefan message:'Hello'
Smalltalk enableBreakPoint:#stefan.
Smalltalk disableBreakPoint:#stefan.
|
-
tracePoint: someKey message: messageBlockOrString
-
Like transcript show, but disabled by default.
Can be easily enabled.
Can be filtered on the arguments value (typically: a symbol).
Code with tracepoints may be even checked into the source repository
Usage example(s):
Smalltalk enableBreakPoint:#stefan.
nil tracePoint:#stefan.
nil tracePoint:#stefan message:'Hello'.
nil tracePoint:#stefan message:['Hello from block'].
Smalltalk disableBreakPoint:#stefan.
|
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.
Usage example(s):
-
dependents: aCollectionOrWeakReference
-
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
( an extension from the stx:libbasic2 package )
-
install an interest forwarder.
Here, we use the nonWeakDependencies.
-
expressInterestIn: aspect for: anObject sendBack: aSelector
( an extension from the stx:libbasic2 package )
-
arrange for aSelector to be sent to anObject whenever the receiver
changes aspect.
Usage example(s):
|p b|
b := [Transcript showCR:' -> the point changed'].
p := Point new.
Transcript showCR:'interest in #foo:'.
p expressInterestIn:#foo for:b sendBack:#value.
p x:1.
Transcript showCR:'now changing #bar ... (expect no notification)'.
p changed:#bar.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'now changing #foo ... (expect notification)'.
p changed:#foo.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'no more interest in #foo:'.
p retractInterestIn:#foo for:b.
Transcript showCR:'now changing #foo ... (expect no notification)'.
p changed:#foo.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'interest in #bar now:'.
p expressInterestIn:#bar for:b sendBack:#value.
Transcript showCR:'now changing #foo ... (expect no notification)'.
p changed:#foo.
Transcript showCR:'now changing #bar ... (expect notification)'.
p changed:#bar.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'interest in #foo now:'.
p expressInterestIn:#foo for:b sendBack:#value.
Transcript showCR:'now changing #foo ... (expect notification)'.
p changed:#foo.
Transcript showCR:'now changing #bar ... (expect notification)'.
p changed:#bar.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'no more interests:'.
p retractInterestsFor:b.
Transcript showCR:'now changing #foo ... (expect no notification)'.
p changed:#foo.
Transcript showCR:'now changing #bar... (expect no notification)'.
p changed:#bar.
Transcript cr.
p release.
|
-
interests
( an extension from the stx:libbasic2 package )
-
return a Collection of interests - empty if there is none.
Here, we use the nonWeakDependents for interests.
-
interestsFor: someOne
( an extension from the stx:libbasic2 package )
-
return a collection of interests of someOne - empty if there is none.
-
onChange: aspect evaluate: aBlock
( an extension from the stx:libbasic2 package )
-
arrange for aBlock to be evaluated whenever the receiver changes the given aspect.
Usage example(s):
|p b|
b := [Transcript showCR:' -> the point changed X'].
p := Point new.
Transcript showCR:'interest in #x, #y'.
p onChange:#x evaluate:b.
p onChange:#y evaluate:[Transcript showCR:' -> the point changed Y'].
Transcript showCR:'now changing ...'.
p changed.
Transcript showCR:'now changing #bar ...'.
p changed:#bar.
Transcript showCR:'now changing #x ...'.
p x:1.
p changed:#x.
Transcript showCR:'now changing #y ...'.
p y:1.
p changed:#y.
Transcript showCR:'no more interests'.
p retractInterests.
p changed:#bar.
p changed:#y.
p changed:#x.
|
-
onChange: aspect send: aSelector to: anObject
( an extension from the stx:libbasic2 package )
-
arrange for aSelector to be sent to anObject whenever the receiver
changed the given aspect.
Use retractInterestsFor: in case you are no longer interested
Usage example(s):
|p b|
b := [Transcript showCR:'the point changed X'].
p := Point new.
p onChange:#x send:#value to:b.
p onChange:#y send:#value to:[Transcript showCR:'the point changed Y'].
Transcript showCR:'now changing x'.
p x:1.
p changed:#x.
Transcript cr.
Transcript showCR:'now changing y'.
p y:2.
p changed:#y.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'now changing (any)'.
p changed.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'no more interest in x'.
p retractInterestsFor:b.
Transcript showCR:'now changing again'.
p changed:#y.
p changed:#x.
p changed.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'interest in x again'.
p onChange:#x send:#value to:b.
Transcript showCR:'now changing again'.
p changed:#y.
p changed:#x.
p changed.
Transcript cr.
Transcript showCR:'no more interest at all'.
p retractInterests.
p changed:#y.
p changed:#x.
p changed.
Transcript cr.
|
-
onChange: aspect to: newValue evaluate: aBlock
-
arrange for aBlock to be evaluated whenever the receiver changes the given aspect
to that particular value.
-
onChangeEvaluate: aBlock
( an extension from the stx:libbasic2 package )
-
arrange for aBlock to be evaluated whenever the receiver changes.
aBlock may be a 0, 1, 2, 3 or 4-arg block;
if 1 arg, it will be evaluated with the aspect as arg;
if 2 args, it will be evaluated with the aspect and the change parameter as args;
if 3 args, it will be evaluated with the aspect and the change parameter and originator as args;
if 4 args, it will be evaluated with the aspect, the change parameter, originator and interest converter itself as args;
Usage example(s):
|v|
v := ValueHolder new.
v onChangeEvaluate:[ Transcript showCR:'0-arg block called'].
v onChangeEvaluate:[:aspect | Transcript showCR: e'1-arg block called with {aspect}' ].
v onChangeEvaluate:[:aspect :param | Transcript showCR: e'2-arg block called with {aspect} and {param}' ].
v onChangeEvaluate:[:aspect :param :originator | Transcript showCR: e'3-arg block called with {aspect} and {param} and {originator}' ].
v value:1.
|
Usage example(s):
|v|
v := Object new.
v onChangeEvaluate:[ Transcript showCR:'0-arg block called'].
v onChangeEvaluate:[:aspect | Transcript showCR: e'1-arg block called with {aspect}' ].
v onChangeEvaluate:[:aspect :param | Transcript showCR: e'2-arg block called with {aspect} and {param}' ].
v onChangeEvaluate:[:aspect :param :originator | Transcript showCR: e'3-arg block called with {aspect} and {param} and {originator}' ].
v changed:#foo with:#param.
|
Usage example(s):
|p b|
b := [Transcript showCR:' -> the point changed'].
p := Point new.
Transcript showCR:'interest in #foo:'.
p onChangeEvaluate:b.
p x:1.
Transcript showCR:'now changing #bar ... (expect no notification)'.
p changed:#bar.
p retractInterests.
p changed:#bar.
|
-
onChangeSend: aSelector to: anObject
( an extension from the stx:libbasic2 package )
-
arrange for aSelector to be sent to anObject whenever the receiver
changes.
Use retractInterestsFor: in case you are no longer interested
Usage example(s):
|p b|
b := [Transcript showCR:'the point changed'].
p := Point new.
p onChangeSend:#value to:b.
p x:1.
Transcript showCR:'now changing'.
p changed.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'now changing'.
p changed.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'no more interest'.
p retractInterestsFor:b.
Transcript showCR:'now changing again'.
p changed.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'interest again'.
p onChangeSend:#value to:b.
Transcript showCR:'now changing again'.
p changed.
Transcript cr.
|
-
onChangeTo: newValue evaluate: aBlock
-
arrange for aBlock to be evaluated whenever the receiver changes the #value aspect
to that particular value.
-
removeDependentAndRetractInterestsFor: someOne
( an extension from the stx:libbasic2 package )
-
remove any dependency and interest of someOne in the receiver.
Answer the receiver
-
removeInterest: anInterest
( an extension from the stx:libbasic2 package )
-
remove an interest forwarder.
Here, we use the nonWeakDependencies.
-
retractInterestIn: aspect for: someOne
( an extension from the stx:libbasic2 package )
-
remove the interest of someOne in the receiver changing aspect
(as installed with #expressInterestIn:for:sendBack:).
Answer the retracted interests.
Usage example(s):
|p b|
b := [Transcript showCR:'the point changed'].
p := Point new.
Transcript showCR:'interest in #foo'.
p expressInterestIn:#foo for:b sendBack:#value.
p x:1.
Transcript showCR:'now changing #bar'.
p changed:#bar.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'now changing #foo'.
p changed:#foo.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'no more interest in #foo'.
p retractInterestIn:#foo for:b.
Transcript showCR:'now changing #foo'.
p changed:#foo.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'interest in #bar now'.
p expressInterestIn:#bar for:b sendBack:#value.
Transcript showCR:'now changing #foo'.
p changed:#foo.
Transcript showCR:'now changing #bar'.
p changed:#bar.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'interest in #foo now'.
p expressInterestIn:#foo for:b sendBack:#value.
Transcript showCR:'now changing #foo'.
p changed:#foo.
Transcript showCR:'now changing #bar'.
p changed:#bar.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'no more interests'.
p retractInterestsFor:b.
Transcript showCR:'now changing #foo'.
p changed:#foo.
Transcript showCR:'now changing #bar'.
p changed:#bar.
Transcript cr.
|
-
retractInterests
( an extension from the stx:libbasic2 package )
-
remove all interests in the receiver changing aspect
(as installed with #expressInterestIn:for:sendBack:).
Answer the retraced interests.
-
retractInterestsFor: someOne
( an extension from the stx:libbasic2 package )
-
remove the interest of someOne in the receiver
(as installed with #onChangeSend:to:).
Answer the retracted interests.
Usage example(s):
|p b|
b := [Transcript showCR:'the point changed'].
p := Point new.
p onChangeSend:#value to:b.
p x:1.
Transcript showCR:'now changing'.
p changed.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'now changing'.
p changed.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'no more interest'.
p retractInterestsFor:b.
Transcript showCR:'now changing again'.
p changed.
Transcript cr.
Delay waitForSeconds:1.
Transcript showCR:'interest again'.
p onChangeSend:#value to:b.
Transcript showCR:'now changing again'.
p changed.
Transcript cr.
|
-
retractInterestsForWhich: aBlock
( an extension from the stx:libbasic2 package )
-
remove all interests in the receiver changing aspect
(as installed with #expressInterestIn:for:sendBack:).
Answer the retracted interests.
-
retractInterestsIn: aspect
( an extension from the stx:libbasic2 package )
-
remove all interests in the receiver changing aspect
(as installed with #expressInterestIn:for:sendBack:).
Answer the retracted interests.
dependents-st/v event simulation
-
removeActionsForEvent: eventSymbol
( an extension from the stx:libbasic2 package )
-
remove ST/V-style event triggers.
-
removeActionsWithReceiver: aReceiver
( an extension from the stx:libbasic2 package )
-
remove ST/V-style event triggers.
-
removeAllActionsWithReceiver: anObject
( an extension from the stx:libbasic2 package )
-
remove ST/V-style event triggers.
-
triggerEvent: aSymbol
( an extension from the stx:libbasic2 package )
-
-
triggerEvent: eventSymbol with: aParameter
( an extension from the stx:libbasic2 package )
-
perform ST/V-style event triggering.
-
triggerEvent: eventSymbol withArguments: parameters
( an extension from the stx:libbasic2 package )
-
perform ST/V-style event triggering.
-
when: eventSymbol evaluate: aBlock
( an extension from the stx:libbasic2 package )
-
install an ST/V-style interest forwarder.
Usage example(s):
|p|
p := Point new.
p when:#foo evaluate:[:arg | Transcript show:'foo: '; showCR:arg].
Transcript showCR:'now changing'.
p triggerEvent:#foo with:'fooArg'.
p removeActionsForEvent:#foo.
|
-
when: eventSymbol send: selector to: anObject
( an extension from the stx:libbasic2 package )
-
install an ST/V-style interest forwarder.
Here, we use the nonWeakDependencies.
Usage example(s):
|p b|
b := [Transcript showCR:'the point changed'].
p := Point new.
p when:#foo:bar: send:#value:value: to:[:a :b | Transcript show:'foo: '; show:a; show:' bar: '; showCR:b].
Transcript showCR:'now changing'.
p triggerEvent:#foo:bar: withArguments:#('fooArg' 'barArg').
p removeActionsForEvent:#foo:bar:.
|
-
when: eventSymbol send: selector to: anObject with: aParameter
( an extension from the stx:libbasic2 package )
-
install an ST/V-style interest forwarder.
Here, we use the nonWeakDependencies.
Usage example(s):
|p b|
b := [Transcript showCR:'the point changed'].
p := Point new.
p
when:#foo:
send:#value:
to:[:a | Transcript show:'foo: '; showCR:a]
with:123.
Transcript showCR:'now changing'.
p triggerEvent:#foo:.
p triggerEvent:#foo: with:987.
p removeActionsForEvent:#foo:.
|
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.
-
classDisplayString
-
used by walkbacks and inspectors;
same as self class displayString for smalltalk objects;
redefinable for proxy objects to not display the className of the proxy,
but the classname of the remote object (-> JavaObject)
-
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 ...)
Notice: displayString and displayOn: are for developers, debugging and inspectors,
whereas printString and printOn: are for the program to print data.
-
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 (or any view) - 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 (or any view) - 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 (or any view) - for example.
The fallBack here shows the receiver's 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.
Notice: displayString and displayOn: are for developers, debugging and inspectors,
whereas printString and printOn: are for the program to print data.
Note: the base method (used by the inspector) is #displayOn:.
So you should implement #displayOn: instead of #displayString in subclasses.
Usage example(s):
#(1 2 3) printString
#(1 2 3) displayString
#(1 2 3) storeString
#hello printString
#hello displayString
#hello storeString
|
-
displayStringLimitedTo: sizeLimit
-
return a string for printing the receiver, but limit the result string in its size.
(i.e. silently truncate the string at sizeLimit and append '...').
In 99% of situations, the printString and the displayString are the same;
displayString is used in inspectos and may sometimes show more info;
printString is usually used for showing in labels, transcript, logs and webpages, etc.
i.e. printString is for the user; displayString is for the programmer
Usage example(s):
Date today displayStringLimitedTo:5.
'12345678901234567890' displayStringLimitedTo:5.
(Array new:100000) displayStringLimitedTo:100.
|
-
heightOn: aGC
-
return the height of the receiver, if it is to be displayed on aGC
-
printStringForPrintIt
-
for compatibility (used to be displayString),
the printIt menu function now sends this message,
allowing for more fine-grain control over what is printed.
Usage example(s):
#(1 2 3) printString
#(1 2 3) printStringForPrintIt
#(1 2 3) storeString
'hello' printString
'hello' printStringForPrintIt
'hello' storeString
|
-
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).
-
equalFromFixedDecimal: aFixedDecimal
( an extension from the stx:libbasic2 package )
-
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 and stores them using the setters
as coming from the literal array encoded specArray.
-
literalArrayEncoding
-
generate a literalArrayEncoding array for myself.
This uses #literalArrayEncodingSlotOrder which defines the slots and
order and #skippedInLiteralEncoding which defines slots to skip.
In addition, an object may define virtualSlotsInLiteralEncoding for slots
which are not really instvars, but should be fetched via getters.
For most subclasses, there is no need to redefine those.
Usage example(s):
(1 -> 2) literalArrayEncoding
DebugView menuSpec decodeAsLiteralArray literalArrayEncoding =
DebugView menuSpec
|
-
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)
-
preDecodeFrom: aDecoder aspect: aspectSymbol
-
invoked by xmlDecoder (and others in the future), before an
object will be decoded (i.e. its instance variables will be restored)
-
readJSONContentsFrom: aJSONObject
-
redefinable to use direct instvar access
-
readJSONContentsFrom: aJSONObject for: aJSONDecoder
-
called from the JSON decoder; passes itself in case someone wants to
use it as a loader context;
If not redefined, I will forward the message to a variant which does not
need the decoder.
redefinable to use direct instvar access
-
readJSONContentsFrom: aJSONObject for: aJSONDecoder useSetters: useSetters
-
called from the JSON decoder; passes itself in case someone wants to
use it as a loader context;
If not redefined, I will forward the message to a variant which does not
need the decoder.
redefinable to use direct instvar access
-
readJSONContentsFrom: aJSONObject useSetters: useSetters
-
-
skipNilInJSONEncoding
( an extension from the stx:goodies/communication package )
-
return true, if nil instSlot values should be skipped when generating a jsonEncoding.
This will only affect instSlots being serialized;
it will NOT affect dictionaries and arrays, as their size may depend on the number
of slots xferred.
Usually, objects created have nil entries anyway, and do not need them to be
transferred. So we return true here. (I guess, that is ok)
-
skippedInJSONEncoding
( an extension from the stx:goodies/communication package )
-
return the names of inst-slots which are to be skipped when generating a jsonEncoding;
(to skip the ones with default or irrelevant values.)
-
skippedInLiteralEncoding
-
return the inst-slots which are skipped when generating a literalArrayEncoding;
(to skip the ones with default or irrelevant values.)
-
storeJSONByRef
( an extension from the stx:goodies/communication package )
-
object can suppress being stored by reference
but notice: only the non-standard stx encoders supprort that;
other encoders will raise an error if such an object is encountered
-
toJSON
( an extension from the stx:goodies/communication package )
-
<<END
{1 . 2 . 3} toJSON -> '[1,2,3]'
{ foo:1 . bar:2 . baz:3} toJSON -> '{"foo":1,"bar":2,"baz":3}'
END"
-
toJSONIndented
( an extension from the stx:goodies/communication package )
-
<<END
{ foo:1 . bar:2 . baz:3} toJSON -> '{"foo":1,"bar":2,"baz":3}'
{ foo:1 . bar:2 . baz:3} toJSONIndented ->
'{
"foo":1,
"bar":2,
"baz":3
}'
END"
-
virtualSlotsInLiteralEncoding
-
defines additional virtual slots in the literalEncoding.
These are not instvars, but accessed via getters and setters during
store and load.
Use this when flags encode values which were previously encoded as boolean instvars,
to remain backward compatible
error handling
-
abortOperation
-
raise the AbortOperationRequest signal.
This will unwind and bring the current thread back to the event-handling loop,
effectively aborting any current menu, user, doIt, printIt or other operation.
-
ambiguousMessage: aMessage
-
this message is sent by the system in case that it
is not clear which method to execute in response to
aMessage.
Such situation may occur when a current selector namespace
imports two namespaces and both define a method with the
requested selector.
-
argumentError
-
report an error that some bad argument was given to a methof.
The error is reported by raising the ArgumentError exception.
-
argumentError: msg
-
report an error that some bad argument was given to a methof.
The error is reported by raising the ArgumentError exception.
-
argumentError: msg with: aValue
-
report an error that some bad argument was given to a methof.
The error is reported by raising the ArgumentError exception.
-
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.
-
elementBoundsError: aValue atIndex: indexOrNil
-
report an error that aValue is not valid as element at indexOrNil
(i.e. cannot be put into that collection).
indexOrNil is non-nil if the index is known or irrelevant, nil if not (eg. for atAllPut:)
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 occurred.
The error is reported by raising the Error exception,
which is non-proceedable.
If no handler has been setup, a debugger is entered.
Usage example(s):
report error that an error occurred.
The error is reported by raising the Error exception,
which is non-proceedable.
If no handler has been setup, a debugger is entered.
|
Usage example(s):
-
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.
Usage example(s):
-
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
-
errorUnsupported: what
-
report an error that some functionality is not supported
Usage example(s):
self errorUnsupported:'foobar'
|
-
handlerForSignal: exceptionCreator context: theContext originator: originator
-
should never be invoked for non-blocks/non-exceptions/non-signals
-
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
-
mustBeRectangle
-
report an argument-not-rectangle-error
-
mustBeString
-
report an argument-not-string-error
-
noModificationError
-
a store is attempted into an immutable collection (typically: a literal).
For our convenience, find the method that contains me, for a nicer error message
-
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.
-
primitiveFailed
-
report an error that some primitive code failed.
The error is reported by raising the PrimitiveFailure exception.
Usage example(s):
-
primitiveFailed: messageString
-
report an error that some primitive code failed.
The error is reported by raising the PrimitiveFailureSignal exception.
Usage example(s):
1234 primitiveFailed:'this is a test'
|
-
proceedableError: errorMessage
-
Report a proceedable error.
A handler can provide a default value
Usage example(s):
123 proceedableError:'some error'
|
-
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.
Usage example(s):
-
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.
Usage example(s):
self shouldImplement:'foobar'
|
-
shouldNeverBeReached
-
report an error that this point must never be reached.
-
shouldNeverBeSent
-
report an error that this message must never be sent to the receiver
-
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.
-
shouldNotImplement: errorString
-
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
error handling - debugger
-
addDebuggerHook: aBlock
-
add a debugger hook. Any registered hook is evaluated with the exception as
argument before a real debugger is entered.
Hooks can be used for two purposes:
- record exception information in a log file
- filter exceptions and either decide to ignore them or to open an alternative
debugger (depending on the exception type, maybe)
Usage example(s):
Object addDebuggerHook:[:ex | AbortSignal raise].
(1 / (1-1)).
Object removeDebuggerHook:(DebuggerHooks first).
|
Usage example(s):
Object addDebuggerHook:[:ex | Transcript showCR:ex ].
(1 / (1-1)).
Object removeDebuggerHook:(DebuggerHooks first).
|
Usage example(s):
Object addDebuggerHook:[:ex | ex suspendedContext fullPrintAllOn:Transcript ].
(1 / (1-1)).
Object removeDebuggerHook:(DebuggerHooks first).
|
Usage example(s):
Object addDebuggerHook:[:ex | '/tmp/stx.log' asFilename
appendingFileDo:[:s |
s nextPutLine:'----------------------'.
(Timestamp now printOn:s). s cr.
ex suspendedContext fullPrintAllOn:s
]].
(1 / (1-1)).
Object removeDebuggerHook:(DebuggerHooks first).
|
-
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.
-
openDebuggerOnException: ex
-
enter the debugger on some unhandled exception
-
removeDebuggerHook: aBlock
-
remove a debugger hook.
evaluation
-
_evaluate_
-
return the receiver itself.
- compatibility with LazyValue
-
asCollectionDo: aBlock
-
enumerate myself as a Collection.
Redefined in Collection.
-
doIfNotNil: aBlock
-
if I am a collection, then enumerate myself into aBlock.
if I am nil, then do nothing.
Otherwise, evaluate aBlock with myself as argument.
Return the receiver.
Redefined in Collection and UndefinedObject.
-
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: don't '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 'optimization' will work semantically correct,
but execute SLOWER instead.
Using constants (foo ifTrue:1 ifFalse:2) does not introduce a performance penalty.
-
valueWithOptionalArgument: arg
-
see comment in #value.
The arg is ignored here
(equivalent to sending this message to a 0-arg Block)
Usage example(s):
[ 'abc' ] valueWithOptionalArgument:1
'abc' valueWithOptionalArgument:1
'abc' asValue valueWithOptionalArgument:1
|
-
valueWithPossibleArguments: argArray
-
see comment in #value.
The argArray is ignored here
(equivalent to sending this message to a 0-arg Block)
Usage example(s):
[ 'abc' ] valueWithPossibleArguments:#(1 2 3)
'abc' valueWithPossibleArguments:#(1 2 3)
'abc' asValue valueWithPossibleArguments:#(1 2 3)
|
finalization
-
disposed
-
OBSOLETE INTERFACE: please redefine #finalize instead.
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 & Squeak 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: please redefine #executor instead.
This is used to acquire 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
inspecting
-
classNameShownInInspector
( an extension from the stx:libtool package )
-
return the classname of the receiver's class as shown in the inspector
-
inspector2TabClass
( an extension from the stx:libtool package )
-
a tab, showing a class browser;
by default, the Tools::Inspector2Tab chooses one
-
inspector2TabDisplayObject
( an extension from the stx:libtool package )
-
a tab, showing the receiver as display object
-
inspector2TabForBasicInspect
( an extension from the stx:libtool package )
-
a tab, showing the old basic inspector
-
inspector2TabForInspectorClass
( an extension from the stx:libtool package )
-
a tab, showing the old inspector
-
inspector2TabJSON
( an extension from the stx:libtool package )
-
because JSON generation may take a long time, only do it when the tab's view is mapped.
-
inspector2TabLabel
( an extension from the stx:libtool package )
-
label of the main tab
-
inspector2Tabs
( an extension from the stx:libtool package )
-
a collection of tabs to show in the new inspector;
redefined by many to add more tabs (bitmap, hexDump, color, etc.).
Nowadays do not use this, simply add a method with an <inspector2Tab> annotation.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
inspectorExtraAttributes
( an extension from the stx:libtool package )
-
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
-
inspectorExtraAttributesWithJSON: attrs
( an extension from the stx:libtool package )
-
common helper
-
inspectorExtraMenuOperations
( an extension from the stx:libtool package )
-
extra operation-menu entries to be shown in an inspector.
Answers a collection of spec-entries containing:
aString is the label of the menu item.
aBlock is evaluated when the menu item is selected.
[optional] boolean or boolean valueHolder if enabled.
To be redefined in objects which think that it makes sense to offer
often used operations in an inspector's top menu.
See SerialPort, Color or FileStream as examples.
-
inspectorLabelInWindowTitle
( an extension from the stx:libtool package )
-
what is the inspector showing for me in the title.
Moved out of he inspector to allow redefinition for eg. remote objects
-
inspectorValueListIconFor: anInspector
( an extension from the stx:libtool package )
-
returns the icon to be shown alongside the value list of an inspector
-
inspectorValueStringInListFor: anInspector
( an extension from the stx:libtool package )
-
returns a string to be shown in the inspector's list.
Only to be redefined where it is guaranteed, that the returned string is short.
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 occurred - 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.
Usage example(s):
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.
Usage example(s):
'Stray recursionInterrupt ...' infoPrintCR.
|
-
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 occurred - 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.
-
signalInterruptWithCrashImage: signalNumber
-
special cases
- SIGPWR: power failure - write a crash image and continue
- SIGHUP: hang up - write a crash image and exit
-
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 from: originator
-
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.
Set the originator to distinguish UserInterrupts from controlling tty vs.
UserInterrupt from a view.
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.
Usage example(s):
|rec sel|
rec := -1.
sel := #abs.
rec perform:sel withOptionalArgument:2.
sel := #max:.
rec perform:sel withOptionalArgument:2.
|
-
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.
Usage example(s):
|rec sel|
rec := -1.
sel := #abs.
rec perform:sel withOptionalArgument:2.
sel := #max:.
rec perform:sel withOptionalArgument:2.
|
-
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.
Usage example(s):
|rec sel|
rec := -1.
sel := #abs.
rec perform:sel withOptionalArgument:2.
sel := #max:.
rec perform:sel withOptionalArgument:2.
|
-
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.
Usage example(s):
|rec sel|
rec := -1.
sel := #abs.
rec perform:sel withOptionalArgument:2.
sel := #max:.
rec perform:sel withOptionalArgument:2.
|
-
performMessage: aMessage
-
Send aMessage, an object which provides a selector and arguments to the
receiver object.
Added for Ansi compatibility
Usage example(s):
123 performMessage:(Message selector:#+ argument:100)
|
-
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.
Usage example(s):
|mthd|
mthd := SmallInteger compiledMethodAt:#negated.
Transcript showCR:(1 performMethod:mthd)
|
-
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.
Usage example(s):
|mthd|
mthd := SmallInteger compiledMethodAt:#+.
Transcript showCR:(1 performMethod:mthd arguments:#(2))
|
-
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.
Usage example(s):
|mthd|
mthd := SmallInteger compiledMethodAt:#+.
Transcript showCR:(1 performMethod:mthd with:2)
|
-
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.
Usage example(s):
|mthd arr|
arr := Array new:1.
mthd := Array compiledMethodAt:#basicAt:put:.
arr performMethod:mthd with:1 with:'foo'.
Transcript showCR:arr
|
-
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.
-
performX: aSelector
-
send the message aSelector to the receiver
This is the original implementation of #perform, for reference (before Jan's changes for Ruby tuning).
-
returnablePerform: aSelector with: arg
-
send the one-arg-message aSelector to the receiver.
This is the same as #perform:with: but the context can return.
misc ui support
-
browse
-
open a browser on the receiver's class
Usage example(s):
10 browse
Collection browse
Collection class browse
|
-
inspect
-
launch an inspector on the receiver.
this method (or better: inspectorClass) can be redefined in subclasses
to start special inspectors.
Usage example(s):
launch an inspector on the receiver.
this method (or better: inspectorClass) can be redefined in subclasses
to start special inspectors.
|
Usage example(s):
the new inspector2 will create multiple tabs containing basic,regular and type-specific inspectors
|
Usage example(s):
Object new inspect
(1 @ 2) inspect
Smalltalk inspect
#(1 2 3) asOrderedCollection inspect
(Color red) inspect
(Image fromFile:'../../goodies/bitmaps/gifImages/garfield.gif') inspect
|
-
inspectorClass
-
return the class to use for inspect.
Can (should) be redefined in classes for which a better inspector is available
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
Usage example(s):
#(1 2 3 nil true symbol) elementDescriptorForInstanceVariables
Dictionary new elementDescriptorForInstanceVariables
(5 @ nil) elementDescriptorForInstanceVariables
|
-
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
Usage example(s):
#(1 2 3 nil true symbol) elementDescriptorForNonNilInstanceVariables
Dictionary new elementDescriptorForNonNilInstanceVariables
(5 @ nil) elementDescriptorForNonNilInstanceVariables
|
printing & storing
-
__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'
Usage example(s):
'hello' infoPrint. ' world' __infoPrintCR.
'foo [info] hello' __infoPrintCR.
|
-
__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'
Usage example(s):
-
_errorPrint
-
Do not use this in user code.
Prints on stderr, regardless of any redirection to a logger.
Only to be used by the MiniDebugger or during early startup (before classes are initialized),
to ensure that its output is shown to a user
Usage example(s):
#('bla' 'fasel') _errorPrint
'hello' asUnicode16String _errorPrint
'helloαβγ' asUnicode16String _errorPrint
'helloαβγ' asUnicode16String _errorPrintCR
|
-
_errorPrintCR
-
Do not use this in user code.
Prints on stderr, regardless of any redirection to a logger.
Only to be used by the MiniDebugger or during early startup (before classes are initialized),
to ensure that its output is shown to a user
-
_print
-
Do not use this in user code.
Prints on stdout, regardless of any redirection to a logger.
Only to be used by low-level crash utilities (like MiniDebugger),
to ensure that its output is shown to a user
-
_printCR
-
Do not use this in user code.
Prints on stdout, regardless of any redirection to a logger.
Only to be used by low-level crash utilities (like MiniDebugger),
to ensure that its output is shown to a user
-
basicPrintOn: aStream
-
append the receiver's className with an article to the argument, aStream
-
basicStoreString
-
defined here for compatibility with CharacterArray, which redefines this
-
className
-
return the classname of the receiver's class
Usage example(s):
1 className
1 class className
$a className
$a class className
|
-
classNameWithArticle
-
return a string consisting of classname preceeded by an article.
(don't expect me to write national variants for this ... :-)
If you have special preferences, redefine it ...
Usage example(s):
1 classNameWithArticle
(1->2) classNameWithArticle
XWorkstation basicNew classNameWithArticle
XWorkstation classNameWithArticle
|
-
errorPrint
-
if a logger has been defined, let it print the receiver when a CR is coming.
Otherwise, print the receiver on the Transcript and Stderr.
The Transcript is directed to the standard error stream on
headless applications.
Usage example(s):
the following allows errorPrint to be used during
|
-
errorPrintCR
-
if a logger has been defined, let it print the receiver.
otherwise, print the receiver followed by a cr on the error stream(s).
The Transcript is directed to the standard error stream on
headless applications.
Usage example(s):
the following allows errorPrintCR to be used during
|
Usage example(s):
'hello' errorPrintCR
'aöäü' errorPrintCR
|
-
infoPrint
-
if a logger has been defined, let it print the receiver when a CR is coming.
otherwise 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'
Usage example(s):
if a logger has been defined, let it print the receiver when a CR is coming.
otherwise 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'
|
Usage example(s):
'hello' infoPrint. ' world' infoPrintCR.
'foo [info] hello' infoPrintCR.
|
-
infoPrintCR
-
if a logger has been defined, let it print the receiver.
otherwise 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'
Usage example(s):
-
print
-
print the receiver on the standard output stream (which is not the Transcript)
Usage example(s):
the following allows print/printCR to be used during
|
-
printCR
-
print the receiver followed by a cr on the standard output stream (which is not the Transcript)
Usage example(s):
the following allows printCR to be used during
|
-
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 receiver's class name.
BUT: this method is heavily redefined for objects which
can print prettier.
Usage example(s):
(1@2) printOn:Transcript
(1@2) basicPrintOn:Transcript
|
-
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.
Usage example(s):
123 printOn:Transcript leftPaddedTo:10. Transcript cr
123 printOn:Transcript leftPaddedTo:2. Transcript cr
|
-
printOn: aStream leftPaddedTo: size with: padCharacter
-
print the receiver on aStream, padding with padCharacters up to size.
padding is done on the left.
Usage example(s):
123 printOn:Transcript leftPaddedTo:10 with:$_ . Transcript cr
123 printOn:Transcript leftPaddedTo:10 with:$. . Transcript cr
|
-
printOn: aStream paddedTo: size
-
print the receiver on aStream, padding with spaces up to size.
Usage example(s):
123.0 printOn:Transcript paddedTo:10. Transcript nextPut:$|. Transcript cr
|
-
printOn: aStream paddedTo: size with: padCharacter
-
print the receiver on aStream, padding with padCharacter up to size
Usage example(s):
123 printOn:Transcript paddedTo:10 with:$_ . Transcript cr
123 printOn:Transcript paddedTo:10 with:$. . Transcript cr
|
-
printOn: aStream zeroPaddedTo: size
-
print the receiver on aStream, padding with zeros up to size.
Usually used with float numbers.
Usage example(s):
123.0 printOn:Transcript zeroPaddedTo:10
|
-
printRightAdjustLen: 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) **
-
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.
Usage example(s):
-
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)
Usage example(s):
10 printStringLeftPaddedTo:10
1 printStringLeftPaddedTo:10
|
-
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.
Usage example(s):
12 printStringLeftPaddedTo:3 ifLarger:['***']
123 printStringLeftPaddedTo:3 ifLarger:['***']
1234 printStringLeftPaddedTo:3 ifLarger:['***']
|
-
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)
Usage example(s):
123 printStringLeftPaddedTo:10 with:$.
1 printStringLeftPaddedTo:10 with:$.
(Float pi) printStringLeftPaddedTo:20 with:$*
|
-
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.
Usage example(s):
12 printStringLeftPaddedTo:3 with:$. ifLarger:['***']
123 printStringLeftPaddedTo:3 with:$. ifLarger:['***']
1234 printStringLeftPaddedTo:3 with:$. ifLarger:['***']
|
-
printStringLimitedTo: sizeLimit
-
return a string for printing the receiver, but limit the result string in its size.
(i.e. silently truncate the string at sizeLimit and append '...')
Usage example(s):
Date today printStringLimitedTo:5.
'12345678901234567890' printStringLimitedTo:5.
(Array new:100000) printStringLimitedTo:100.
|
-
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)
Usage example(s):
123 printStringPaddedTo:10
1234567890123456 printStringPaddedTo:10
'hello' printStringPaddedTo:10
|
-
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.
Usage example(s):
12 printStringPaddedTo:3 ifLarger:['***']
123 printStringPaddedTo:3 ifLarger:['***']
1234 printStringPaddedTo:3 ifLarger:['***']
|
-
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)
Usage example(s):
123 printStringPaddedTo:10 with:$.
123 printStringPaddedTo:10 with:$*
123 printStringPaddedTo:3 with:$*
1234 printStringPaddedTo:3 with:$*
|
-
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.
Usage example(s):
123 printStringPaddedTo:3 with:$. ifLarger:['***']
12345 printStringPaddedTo:3 with:$. ifLarger:['***']
|
-
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.
Usage example(s):
123.0 printStringZeroPaddedTo:10
|
-
printfPrintString: format
-
fallback to default printString
(for compatibility with float and integer-printing)
Usage example(s):
true printfPrintString:'%-10s'
true printfPrintString:'%10s'
true printString printfPrintString:'%-10s'
true printfPrintString:'%10d'
false printfPrintString:'%10d'
nil printfPrintString:'%10p'
void printfPrintString:'%10p'
true printfPrintString:'%10p'
12345 printfPrintString:'%10p'
nil printfPrintString:'%10d'
void printfPrintString:'%10d'
|
-
store
-
store the receiver on standard output.
this method is useless, but included for compatibility.
-
storeCR
-
store the receiver on standard output; append a carriage return.
-
storeNamedInstvarsOn: aStream
-
store the named instvars of the receiver on aStream;
i.e. print expressions which will set the instvars using instVarAt:put:.
Will not store nil values;
you may need a #yourself at the end
(returns true, if any expression was generated; which implies that a #yourself is needed)
This is a helper/code saver for storeOn:, not meant for public use
-
storeNamedInstvarsStartingAt: idxArg on: aStream
-
store the named instvars starting at index idxArg of the receiver on aStream;
i.e. print expressions which will set the instvars using instVarAt:put:.
Will not store nil values;
you may need a #yourself at the end
(returns true, if any expression was generated; which implies that a #yourself is needed)
This is a helper/code saver for storeOn:, not meant for public use
-
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.
Usage example(s):
|s|
s := '' writeStream.
('hello' -> 'world') storeOn:s.
s := ReadStream on:(s contents).
(Object readFrom:s) inspect
|
Usage example(s):
|s|
s := '' readWriteStream.
('hello' -> 'world') storeOn:s.
s reset.
(Object readFrom:s)
|
Usage example(s):
|s data|
data := ValueHolder new.
data value:data.
s := '' readWriteStream.
data storeOn:s.
s reset.
(Object readFrom:s).
s reset.
[
Object readFrom:s.
] on:RecursiveRestoreError do:[:ex|
self halt.
ex proceedWith:#[].
].
|
-
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.
-
transcribe
-
print the receiver on the Transcript (without CR)
-
transcribeCR
-
print the receiver on the Transcript (with CR)
Usage example(s):
1234 transcribe
1234 transcribeCR
|
-
withErrorStreamDo: aBlock
-
helper for error messages - evaluate aBlock,
passing it a stream on which to put error messages.
Notice that the block might be called twice,
to print both on stderr and onto the Transcript
private array element printing
-
displayAsArrayElementOn: aStream
-
Display myself as an Array element on aStream.
Subclasses may redefine this to omit a leading '#'
-
printAsArrayElementOn: aStream
-
Print myself as an Array element.
Subclasses may redefine this to omit a leading '#'
-
storeAsArrayElementOn: aStream
-
store an object as an Array element.
Subclasses may redefine this to omit a leading '#'
queries
-
basicSize
-
return the number of the receiver's 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 receiver's 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.
Usage example(s):
Point new byteSize
'hello' byteSize
'hello' asUnicode16String byteSize
(ByteArray with:1 with:2) byteSize
(FloatArray with:1.5) byteSize
(DoubleArray with:1.5) byteSize
(WordArray with:1 with:2) byteSize
|
-
class
-
return the receiver's class
-
isCSS
( an extension from the stx:goodies/webServer/htmlTree package )
-
return false here; to be redefined in subclass(es)
-
respondsTo: aSelector
-
return true if the receiver responds to a message with aSelector;
i.e. if there is a method for aSelector in either the
receiver's 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.
Usage example(s):
'aString' respondsTo:#+
'aString' respondsTo:#,
'aString' respondsTo:#collect:
|
-
respondsToArithmetic
-
return true if the receiver responds to arithmetic messages.
This should return true for any object which represents a scalar,
matrix, point, physical value or similar object
which can add, subtract, etc.
false is returned here - the method is redefined in ArithmeticValue.
-
size
-
return the number of the receiver's indexed instance variables;
this method may be redefined in subclasses
-
species
-
return a class which is similar to (or the same as) the receiver's class.
This is used to create an appropriate object when creating derived
copies in the collection classes (sometimes redefined).
-
speciesForCompare
-
return a class to determine if two objects can be compared.
The fallback here is my species; only redefined by some timestamp classes.
FIXME: not all classes (actually currently only one) use this in their #= method
(i.e. it needs to be done eg in Dictionary as well)
-
speciesForCopy
-
return a class which is the receiver's class, except for readonly objects,
such as immutable collections.
This is only to be used by copy methods
-
yourself
-
return the receiver - used for cascades to return self at the end
Usage example(s):
background (Smalltalk beginner's info):
when assigning the result of a cascade, you might nt be sure
(or you do not want to depend on) the return value of the last cascade.
Especially, in instance creation messages such as:
x := Foo new
setter1:value1;
setter2:value2;
...
setterN:value.
Here, the value assigned to x is NOT guaranteed to be the new Foo object;
instead, we depend on the return value of setterN:
(which could be a non-setter, or return some previous value or boolean or nil or whatever).
In this case, place a yourself at the end:
x := Foo new
setter1:value1;
setter2:value2;
...
setterN:value;
yourself.
which quarantees that x will always be the new Foo.
|
secure message sending
-
?: selector
-
try to send a message to the receiver;
if understood, return the value;
if not, return nil.
Usage example(s):
ApplicationModel new masterApplication resources first - error
ApplicationModel new ?: #masterApplication ?: #resources ?: #first - nil
|
-
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.
Usage example(s):
1 askFor:#isColor
Color red askFor:#isColor
1 askFor:#isFoo
Color red askFor:#isFoo
|
-
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: #handlesPointerLeave:inView: to unknown receivers.
-
perform: aSelector ifNotUnderstood: exceptionBlock
-
try to send message aSelector to the receiver.
If it's 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 and this receiver are caught - not any other
doesNotUnderstand, and especially not any other error.
Usage example(s):
1.2345 perform:#foo ifNotUnderstood:['sorry']
1.2345 perform:#sqrt ifNotUnderstood:['sorry']
12345 perform:#sqrt ifNotUnderstood:['sorry']
|
-
perform: aSelector onError: exceptionBlock
-
try to send message aSelector to the receiver.
If there is no error, return the method's returned value,
otherwise return the value of the exceptionBlock.
Read this:
This method catches ALL errors during the perform,
if you only want to catch an unimplemented message,
better use perform:ifNotUnderstood:
otherwise, you may miss other errors, which might need attention
Usage example(s):
1.2345 perform:#foo onError:['sorry']
1.2345 perform:#sqrt onError:['sorry']
12345 perform:#sqrt onError:['sorry']
|
-
perform: aSelector with: argument ifNotUnderstood: exceptionBlock
-
try to send message aSelector to the receiver.
If it's 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 caught - not any other
doesNotUnderstand, and especially not any other error.
Usage example(s):
|unknown|
unknown := 4.
Transcript showCR:(unknown perform:#- with:2 ifNotUnderstood:['sorry']).
unknown := 'high there'.
Transcript showCR:(unknown perform:#- with:2 ifNotUnderstood:['sorry']) printCR.
|
-
perform: aSelector with: arg1 with: arg2 ifNotUnderstood: exceptionBlock
-
try to send message aSelector to the receiver.
If it's 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 caught - 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 it's 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 caught - not any other
doesNotUnderstand, and especially not any other error.
Usage example(s):
|unknown|
unknown := 4.
Transcript showCR:(unknown perform:#- withArguments:#(2) ifNotUnderstood:['sorry']).
unknown := 'high there'.
Transcript showCR:(unknown perform:#- withArguments:#(2) ifNotUnderstood:['sorry']).
|
signal constants
-
messageNotUnderstoodSignal
-
special queries
-
allOwners
-
return a collection of all objects referencing the receiver
-
indexOfSlotReferencingObject: anObject
-
return the slot index (1..) if the receiver refers to the argument, anObject.
0 if the reference is via the class,
nil otherwise
Usage example(s):
|v|
v := View new initialize.
v references:Display.
v indexOfSlotReferencingObject:Display.
v indexOfSlotReferencingObject:false.
v indexOfSlotReferencingObject:View.
v indexOfSlotReferencingObject:'aaaa'.
|
-
references: anObject
-
return true if the receiver refers to the argument, anObject.
- for debugging only
Usage example(s):
|v|
v := View new initialize.
v references:Display.
|
-
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.
Usage example(s):
(1 @ 3.4) referencesDerivedInstanceOf:Number
(1 @ 3.4) referencesDerivedInstanceOf:Array
View new initialize referencesDerivedInstanceOf:DeviceWorkstation
|
-
referencesForWhich: checkBlock do: actionBlock
-
check the instance variables
Usage example(s):
(1 @ 3.4) referencesForWhich:[:i | i isFloat] do:[:i | Transcript showCR:i]
|
-
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.
Usage example(s):
(1 @ 3.4) referencesInstanceOf:Float
(1 @ 3.4) referencesInstanceOf:Fraction
View new initialize referencesInstanceOf:(Display class)
|
-
referencesObject: anObject
-
return true if the receiver refers to the argument, anObject.
- for debugging only
splitting & joining
-
split: aSequenceableCollection
-
treating the receiver as a splitter,
split aSequenceableCollection accordingly and return a collection of fragments.
Usage example(s):
0 split:#(1 2 3 0 4 5 6 0 7 8 9)
Character space split: 'hello world'
' ' split: 'hello world'
$a split:'abacadae'
'aa' split:'abaacaadaae'
[:ch | ch == $a] split:'abaacaadaae'
('a+' asRegex) split:'abaacaadaae'
|
-
split: aCollection do: aBlock
-
treating the receiver as a splitter,
split aSequenceableCollection accordingly and evaluate aBlock for each fragment.
Usage example(s):
' ' split: 'hello world' do: [:frag | Transcript showCR:frag ]
|
-
split: aCollection indicesDo: aTwoArgBlock
-
treating the receiver as a splitter,
split aSequenceableCollection accordingly and evaluate aBlock for each pair of start-
and stop index.
Usage example(s):
1 split:#(10 1 20 30 40 1 50 60 1 70) do: [:frag | Transcript showCR:frag ]
1 split:#(10 1 20 30 40 1 50 60 1 70) indicesDo: [:start :stop | Transcript show:start; show:' to '; showCR:stop ]
nil split:#(10 nil 20 30 40 nil 50 60 nil 70) do: [:frag | Transcript showCR:frag ]
nil split:#(10 nil 20 30 40 nil 50 60 nil 70) indicesDo: [:start :stop | Transcript show:start; show:' to '; showCR:stop ]
|
-
splitFirstIn: aCollection do: aTwoArgBlock
-
treating the receiver as a splitter,
split aSequenceableCollection accordingly at my first encounter
and evaluate aBlock for the two parts (left and right).
If the splitter is not encountered, the block is invoked with nil as right part
(notice, that if the splitter is encountered at the end, but there are not more
elements, then the right part will be an empty collection)
Usage example(s):
' '
splitFirstIn: 'hello world and more to come'
do: [:left :right | Transcript showCR:left; showCR:right ]
|
Usage example(s):
123
splitFirstIn: #(true false 123 1 2 3 4 123 4 5 6)
do: [:left :right | Transcript showCR:left; showCR:right ]
|
Usage example(s):
' '
splitFirstIn: 'helloworld'
do: [:left :right | Transcript showCR:left; showCR:right ]
|
Usage example(s):
' '
splitFirstIn: 'helloworld '
do: [:left :right | Transcript showCR:left; showCR:right ]
|
synchronized evaluation
-
ensureSynchronizationSemaphore
-
return the synchronizationSemaphore.
Create it safe if no one exists yet.
Usage example(s):
Object ensureSynchronizationSemaphore.
|
-
freeSynchronizationSemaphore
-
free synchronizationSemaphore. May be used, to save memory when
an object is no longer used synchronized.
Usage example(s):
self synchronized:[].
self synchronizationSemaphore.
self freeSynchronizationSemaphore.
|
-
synchronizationSemaphore
-
return the synchronization semaphore for myself.
subclasses may redefine.
Return nil, if none has been allocated yet.
Usage example(s):
self synchronizationSemaphore
|
-
synchronizationSemaphore: aSemaphoreOrBetterARecursionLock
-
set the synchronisationSemaphore for myself.
subclasses may redefine this method
-
synchronized: aBlock
-
evaluate aBlock synchronized, i.e. use a monitor for this object;
return the value from aBlock
Usage example(s):
[Object synchronized:[Delay waitForSeconds:2. Transcript showCR:'1']] fork.
[Object synchronized:[Delay waitForSeconds:2. Transcript showCR:'2']] fork.
|
-
synchronized: aBlock timeoutMs: timeoutMs ifBlocking: blockingBlock
-
like synchronized:, but do not block if the lock cannot be acquired
within timeoutMs milliseconds.
Instead, return the value of blockingBlock.
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.
For now the #isImmutable flag prohibits only #become*.
-
beMutable
-
experimental - not yet usable; do not use.
For now the #isImmutable flag prohibits only #become*.
-
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 receiver's 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 receiver's 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.
For now the #isImmutable flag prohibits only #become*.
-
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.
Usage example(s):
|v|
v := Array with:1234 with:'hello' with:Array.
v replaceReferencesTo:Array with:ByteArray.
v inspect
|
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 receiver is returned 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.
Usage example(s):
1 ? #default
nil ? #default
|
-
?+ aOneArgBlock
-
a syntactic sugar-piece:
aOneArgBlock is executed with self as argument
if self is not nil.
Note: this method should never be redefined in classes other than UndefinedObject.
Usage example(s):
1 ?+ [:v| v + 5]
nil ?+ [:v| v + 5]
|
-
?? defaultValue
-
a syntactic sugar-piece:
much like ?, but sends #value to the argument if required.
(i.e. it is 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 receiver is returned 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.
Usage example(s):
1 ?? #default
nil ?? #default
1 ?? [ self halt. 1 + 2 ]
nil ?? [ self halt. 1 + 2 ]
1 ?? [Date today]
nil ?? [Date today]
|
-
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 receiver is non-nil, return the value of aBlock, passing myself as argument.
Otherwise do nothing and return nil.
-
isApplicationModel
-
return true if the receiver is some kind of applicationModel;
false is returned here - the method is only redefined in ApplicationModel.
-
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 object's 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.
-
isBlockOrMessageSend
-
return true if the receiver is some kind of block;
false returned here - the method is only redefined in Block.
-
isBlockWithArgumentCount: count
-
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.
-
isBridgeProxy
-
answer true, if I am a proxy object for a bridged remote object.
Do NOT move this into the bridge package;
it is required to be understood even without a bridge being loaded
(debugger, inspectors, etc. may use it)
-
isBridgedPythonClass
-
return true if this is a Python class
-
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,
This is different from 'self class isBytes',
since e.g. in BitArray single bits are accessed, but it is implemented as variableBytes class.
-
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.
-
isColormap
( an extension from the stx:libview package )
-
-
isComplexNumber
-
return true if the receiver is a complex number;
false is returned here - the method is only redefined in Complex.
-
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.
-
isDate
-
return true if the receiver is some kind of date;
false is returned here - the method is only redefined in Date.
-
isDictionary
-
return true if the receiver is some kind of dictionary;
false returned here - the method is only redefined in Dictionary.
-
isDisplayObject
-
-
isDocument
( an extension from the stx:goodies/xml/vw package )
-
am I an XML Document?
-
isEOF
-
Return true if the receiver is the EOF token.
This is (and should only be) redefined in EOFObject,
for the one and only instance of it, void
Usage example(s):
nil isEOF
void isEOF
EOF isEOF
|
-
isEmptyOrNil
-
return true if I am nil or an empty collection - return false here.
(from Squeak)
-
isException
-
answer true, if this is an Exception
-
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
-
isExternalAddress
-
return true if the receiver is some kind of externalAddress;
false is returned here - the method is only redefined in ExternalAddress.
-
isExternalBytes
-
-
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.
-
isExternalStructure
-
-
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.
Obsolete: use isScaledDecimal
-
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 ;-)
-
isFloatArray
-
return true if the receiver has float elements.
These are Float, Double- and HalfFloat arrays
-
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.
-
isGeometric
-
return true, if the receiver is a geometric object
-
isHierarchicalItem
( an extension from the stx:libwidg2 package )
-
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 by me.
(currently, only SmallIntegers, some characters and nil return true)
-
isInlineObject
-
return true if the receiver is some kind of inline object;
false is returned here - the method is only redefined in InlineObject.
-
isInteger
-
return true if the receiver is some kind of integer number;
false is returned here - the method is only redefined in Integer.
-
isIntegerArray
-
return true if the receiver has integer elements.
These are Byte- and Integer arrays; both signed and unsigned
-
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 PositionableStream.
-
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/protocol 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.
Advice3:
It is usually better to ask for a feature being present,
or an operation to be supported, instead of asking for being something or someone.
For example, it is much better to ask for #respondsToArithmetic,
instead of asking for #isNumber,
Because other things (characters, matrices, physicak/mathematical objects
might also be able to do arithmetic, although not being numbers.
Thus you'd better implement such queries and use those to make your code
more flexble and easier to reuse in the future.
Having sayd all that, and being warned, here is the implementation:
-
isKindOf: class1 orOf: class2
-
return true if the receiver is an instance of class1 or of class2
or one of either subclasses, 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 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.
Advice3:
It is usually better to ask for a feature being present,
or an operation to be supported, instead of asking for being something or someone.
For example, it is much better to ask for #respondsToArithmetic,
instead of asking for #isNumber,
Because other things (characters, matrices, physicak/mathematical objects
might also be able to do arithmetic, although not being numbers.
Thus you'd better implement such queries and use those to make your code
more flexble and easier to reuse in the future.
Having sayd all that, and being warned, here is the implementation:
-
isLabelAndIcon
-
return true if the receiver is a LabelAndIcon;
false is returned here - the method is only redefined in LabelAndIcon.
-
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.
-
isLongFloat
-
return true if the receiver is a long floating point number (iee extended precision);
false is returned here.
-
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).
Read more on this in #isKindOf:
Using #isMemberOf: is considered VERY BAD STYLE.
Notice:
This method is open coded (inlined) by the compiler(s)
- redefining it may not work as expected.
-
isMenuItem
-
return true if the receiver is a menu item inside a MenuPanel, Menu or PopUpmenu.
false is returned here - the method is redefined in some classes.
-
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 - this 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.
-
isMultiDimensionalArray
-
return true if the receiver is some kind of matrix,
i.e. a multiDimensional array.
false is returned here - the method is only redefined in MultiDimensionalArray.
-
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.
Usage example(s):
21 isNonByteCollection
'abc' isNonByteCollection
#'abc' isNonByteCollection
#[1 2 3] isNonByteCollection
#(1 2 3) isNonByteCollection
|
-
isNotNil
-
Return true if the receiver is not nil.
Because isNotNil is redefined in UndefinedObject,
the receiver is definitely not nil here, so unconditionally return true.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
isNumber
-
return true if the receiver is some kind of number;
false is returned here - the method is only redefined in Number.
-
isOSErrorHolder
-
-
isObjectiveCObject
-
return true if the receiver is a proxy for an
objectiveC object.
False is returned here.
-
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.
-
isOsHandle
-
-
isPlainString
-
return true if the receiver is a plain string - without attributes;
false is returned here - the method is redefined in CharacterArray and Text.
-
isPoint
-
return true if the receiver is some kind of point;
false is returned here - the method is only redefined in Point.
-
isPrinterContext
( an extension from the stx:libview2 package )
-
Modified (format): / 01-04-2022 / 11:30:11 / Stefan_Vogel
-
isProgrammingLanguage
-
return true if the receiver is a programming language.
False is returned here - the method is only redefined in
ProgrammingLanguage.
-
isProjectDefinition
-
return true if the receiver is a projectDefinition.
False is returned here - the method is only redefined in ProjectDefinition.
-
isProtoObject
-
-
isProxy
-
return true if the receiver is a proxy for another (lazy loaded) object.
False is returned here.
-
isQuadFloat
-
return true if the receiver is a quad floating point number (iee quad precision);
false is returned here.
-
isRealNameSpace
-
return true if the receiver is a NameSpace, but not Smalltalk (which is also a class).
False is returned here - the method is redefined in Namespace and Smalltalk.
-
isRealNumber
-
return true if the receiver is a real number;
false is returned here - the method is only redefined in subclasses of number.
-
isRectangle
-
return true if the receiver is some kind of rectangle;
false is returned here - the method is only redefined in Rectangle.
-
isScaledDecimal
-
return true if the receiver is some kind of fixedPoint number;
false is returned here - the method is only redefined in FixedPoint.
-
isSequenceable
-
return true if the receiver is sequenceable;
i.e. if its elements are accessible by by at:/at:put: and an integer index,
and support the do:-protocol.
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.
-
isShortFloat
-
return true if the receiver is a short floating point number (iee single precision);
false is returned here.
-
isSingleByteCollection
-
return true, if the receiver has access methods for bytes;
i.e. #at: and #at:put: accesses a byte and are equivalent to #byteAt: and byteAt:put:
and #replaceFrom:to: is equivalent to #replaceBytesFrom:to:.
This is different from 'self class isBytes'.
-
isSingleByteString
-
return true if the receiver is a string or immutableString.
false is returned here - the method is only redefined in String.
Must replace foo isMemberOf:String and foo class == String
-
isSocketAddress
-
-
isSpecialInstrumentationInfoLiteral
( an extension from the stx:libcomp package )
-
return true if the receiver is a special instrumentation info
object as placed into the literal array of instrumented methods
-
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.
-
isTestCaseLike
( an extension from the stx:libtool package )
-
-
isText
-
return true if the receiver is some kind of text object;
false is returned here - the method is only redefined in Text.
-
isTextView
( an extension from the stx:libview package )
-
return true if the receiver is some kind of textView;
false is returned here - the method is only redefined in TextViews.
-
isTime
-
return true if the receiver is some kind of time;
false is returned here - the method is only redefined in Time.
-
isTimeDuration
-
return true if the receiver is some kind of time duration;
false is returned here - the method is only redefined in TimeDuration.
-
isTimestamp
-
return true if the receiver is some kind of time duration;
false is returned here - the method is only redefined in Timestamp.
-
isTrait
( an extension from the stx:libcompat package )
-
Return true if the receiver is a trait.
Note: Do not override in any class except TraitBehavior.
-
isURL
-
Return true if the receiver is a url.
Note: Do not override in any class except URL.
-
isUUID
-
Return true if the receiver is a uuid.
Note: Do not override in any class except UUID.
-
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.
-
isViewBackground
( an extension from the stx:libview package )
-
return false here; to be redefined in subclass(es)
-
isVirtualCollection
-
true if this is a collection which generates elements via
some algorithm (such as reading a file).
Some care should be taken then, as not all operations are possible then.
-
isVisualWorksController
( an extension from the stx:libcompat package )
-
Modified (format): / 12-01-2022 / 09:52:56 / cg
-
isVoid
-
Return true if the receiver is void.
This is (and should only be) redefined in VoidObject,
for the one and only instance of it, void
Usage example(s):
-
isWeak
-
return true if the receiver has weak references to its elements.
-
isWeakCollection
-
return true if the receiver has weak references to its elements.
-
isWeakReference
-
-
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.
Usage example(s):
nil activityNotification:'hello there'
self activityNotification:'hello there'
|
Usage example(s):
ActivityNotification handle:[:ex |
ex errorString printCR.
ex proceed.
] do:[
'hello' printCR.
self activityNotification:'doing some long time computation'.
'world' printCR.
]
|
-
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.
Usage example(s):
nil confirm:'hello'
self confirm:'hello'
|
-
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.
Usage example(s):
self confirm:'hello' orCancel:[self halt]
|
-
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.
Usage example(s):
nil confirmWithCancel:'hello'
self confirmWithCancel:'hello'
|
-
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.
Usage example(s):
nil confirmWithCancel:'hello' defaultAnswer:true
self confirmWithCancel:'hello' defaultAnswer:false
|
-
errorNotify: aString
-
launch a Notifier, showing top stack, telling user something
and give user a chance to enter debugger.
Usage example(s):
nil errorNotify:'hello there'
self errorNotify:'hello there'
|
-
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 give user a chance to enter debugger.
-
errorNotify: aString from: aContext allowDebug: allowDebug mayProceed: mayProceed
-
launch a Notifier, showing top stack (above aContext),
telling user something and optionally give the user a chance to enter debugger.
Usage example(s):
nil errorNotify:'hello there'
self errorNotify:'hello there'
|
-
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.
Usage example(s):
nil information:'hello there'
self information:'hello there'
|
Usage example(s):
InformationSignal handle:[:ex |
'no box popped' printCR.
ex proceed.
] do:[
'hello' printCR.
self information:'some info'.
'world' printCR.
]
|
-
logFacility
-
the 'log facility';
this is used by the Logger both as a prefix to the log message,
and maybe (later) used to filter and/or control per-facility log thresholds.
The default here is to base the facility on my class
Usage example(s):
-
notify: aString
-
launch a Notifier, telling user something.
Use #information: for ignorable messages.
If nobody handles the exception, the default action of UserNotification
pops up a warn dialog.
Usage example(s):
nil notify:'hello there'
self notify:'hello there'
|
-
notifyTodo: msg position: position className: className selector: selector severity: severityOrSeveritySymbol priority: priorityOrPrioritySymbol equalityParameter: equalityParameter checkAction: checkAction
( an extension from the stx:libcomp package )
-
this is a message from the compiler system, to allow for a hook to remember
things to do. Can also used by other subsystems to add entries to the toDoList
Usage example(s):
self
notifyTodo:'foo' position:1
className:'bla' selector:'blabla'
severity:#warning priority:#high
equalityParameter:nil checkAction:[]
|
-
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.
Usage example(s):
nil warn:'hello there'
self warn:'hello there'
|
Usage example(s):
Warning handle:[:ex |
Transcript showCR:ex description.
ex proceed.
] do:[
'hello' printCR.
self warn:'some info'.
'world' printCR.
]
|
visiting
-
acceptJSONVisitor: aJSONEncoder indent: indent
( an extension from the stx:goodies/communication package )
-
double-dispatch onto a Visitor using acceptVisitor.
Can be redefined in classes with a special JSON encoding
(eg. by creating a dictionary and passing that to the jsonEncoder instead,
or by generating the JSON string directly).
The passed in aJSONEncoder can be used or, its stream written to.
Notice: this is not supposed to return a value; instead it should write
to the output stream either through the passed in encoder, or by fetching the
encoder's stream and writing to that.
If not redefined, the previous mechanism (which writes instvars using the
encoder as visitor( is used.
-
acceptVisitor: aVisitor
-
double-dispatch onto a Visitor.
-
acceptVisitor: aVisitor with: aParameter
-
double-dispatch via visitObject:with: into a Visitor.
Subclasses redefine this to pass their type in the message name (i.e. visitXXX:)
xml conversion
-
asXMLAttributeNamed: aName
( an extension from the stx:goodies/xml/stx package )
-
-
asXMLElementNamed: aName
( an extension from the stx:goodies/xml/stx package )
-
AVLTree::AVLNil
AVLTree::AVLTreeNode
AbstractAnnealingCounter
AbstractBackground
AbstractBackgroundJob
AbstractBorder
AbstractChart
AbstractFileBrowser::Clipboard
AbstractFileBrowser::CodeExecutionLock
AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem
AbstractFileBrowser::SaveAspectItem
AbstractHierarchicalItem
AbstractLauncherApplication::LauncherDialogs
AbstractLock
AbstractOperatingSystem
AbstractOperatingSystem::PrinterInfo
AbstractOperatingSystem::ProcessStatusInfo
AbstractOperatingSystem::TimeInfo
AbstractOperatingSystem::TimeZoneInfo
AbstractSourceCodeManager
AbstractSourceCodeManager::PackageAndManager
AbstractSourceFileReader
AbstractSourceFileWriter
AbstractTCPSession
AbstractTCPSocketServer
ActionButton
ActionButtonView
ActionMenu
ActiveObject
Amb
Annotation
Archiver
Archiver::ArchiverOutputParser
AssistantPageSpec
Authentication::AuthenticationData
Authentication::Authenticator
Authentication::User
Author
BTree::BTreeKeys
BTree::BTreeNode
Behavior
BinaryTreeNode
BindingReference
BookmarkVisitor
Boolean
BorderDecorator
Breakpoint
BreakpointDescription
CEnvironment
CachedValue
CallChain
Change
ChangeDeltaInformation
ChangeSet::ChangeFileReader
ChangeSet::ChangeFileWriter
ChangeSet::ClassSourceWriter::ClassInfo
ChangeSet::DiffSet
ChangeSetDiff
ChangeSetDiffComponent
ChangesBrowser::ChangeFileReader
ChangesBrowser::ChangeInfo
CharacterAttributes
CharacterBlockScanner
CharacterEncoder
Class::ClassAttributes
Class::SimulatedClassPool
ClassBuilder
ClassCategoryReader
ClassOrganizer
CmdLineOption
CmdLineParser
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
CompactHierarchicalItem::Geometry
CompilationErrorHandler
ComposedText
CompositionScanner
ConfigurableFeatures
Context
Continuation
Controller
Cursor
CustomHelp
DNSMessage
DNSQuery
DNSRecord
DSVLabelView::LineDrag
DataSetColumn
DataSetColumnSpec
DataSetColumnSpec::EditorAndModel
DataSetLabel
DebugView::IgnoredHaltOrBreakpoint
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
Diff
Diff2
Diff2::Chunk
Diff2::HuntMcilroy::Candidate
Diff2::Patch
Diff3
Diff3::Chunk
Diff3::Conflict
Diff3Hunk
Diff3InclusiveVisitor
Diff::Data
Diff::ForwardScript
Diff::ReverseScript
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::SharedLookupTable
DragAndDropManager
DragDropManager
DragDropManagerTracker
DragHandler
DrawAdaptor
DropContext
DropContext::DragType
DropObject
DropSource
DropTarget
EMailContentDescription
EMailContentDescription::AttachmentDescription
EOFObject
EditTextView::EditAction
EditTextView::EditMode
EditTextView::LastReplacementInfo
EditTextViewCompletionSupport
EnterFieldGroup
ErrorDiffusion
EventListener
ExecutableFunction
Explainer::ActionWithInfo
ExternalAddress
ExternalLibrary
FCGI::FCGIHeader
FCGI::FCGIKeyValuePairs
FCGI::FCGIRecord
FFIExternalEnumeration
FileApplicationNoteBook::ArchiveViewApplication::ArchivItem
FileBrowserV2UISpecifications
FileOperation
FileReference
FileSorter
Filename
FillStyle
Font::DeviceFontHandle
FontDescription
FuzzyMatcher
GapString
GenericException
GenericToolbarIconLibrary
Geometric
GoogleTranslateAPI
GraphicsContext
GraphicsDevice
GraphicsMedium
GridBagConstraints
GridBagLayoutInfo
HTML::AbstractElement
HTML::AbstractTreeBuilder
HTML::CSS_AbstractStyleObject
HTML::HTMLParser
HTML::StyleVisitor
HTML::Visitor
HTMLDocGenerator
HTMLDocument
HTMLDocumentFrame::HRefHistoryEntry
HTMLDocumentInterpreter
HTMLDocumentPainter::BorderStyle
HTMLDocumentPainter::Padding
HTMLDocumentPainter::PainterState
HTMLDocumentPainter::SpanStyle
HTMLDocumentPainter::TextStyle
HTMLFontStyle
HTMLPageStyle
HTMLParser
HTMLScriptEnvironment
HTMLTableCol
HTMLTableRow
HTMLUtilities
HTTPAccessLogger
HTTPConnection
HTTPCookie
HTTPFileService::CachedFileInfo
HTTPHeaderParser
HTTPInterface
HTTPInterface::HTTPCookie
HTTPInterface::HTTPResponse
HTTPInterface::KeptSocketInfo
HTTPProxySettings
HTTPRequest
HTTPRequest::MultipartChunk
HTTPResponse
HTTPResponseHeader
HTTPResponseHeader::CacheControl
HTTPServer
HTTPServerSettingsAppl::PluggableServicesSettingsAppl::ServiceItem
HTTPServerSettingsAppl::VirtualRootItem
HTTPService
HTTPService::NoRealmBehavior
HTTPServiceRequestContext
HTTPSession
HTTPSimpleJSONRestClient
HTTPSimplePluggableJSONRestService::EntryInfo
HTTPSocket
HTTPTentativeObjectService::TemporaryLinkInfo
HexDumpUtility
HierarchicalDropTargetController
HierarchyNode
HistoryManager
HistoryManager::HistoryLine
HtmlSanitizer
HumanReadableImageGenerator
IOAccessor
ISOBMFFReader
ISOBMFFReader::Box
ISOBMFFReader::ItemLocationBox::ExtentInfo
ISOBMFFReader::ItemLocationBox::ItemInfo
Icon
Image
ImageFrame
ImageReader
InlineObject
InputState
InstructionClient
InstructionStream
InstrumentationContext
InstrumentationInfo
InstrumentingCompiler::MethodInvocationInfo::MethodInvocationInfoPerReceiverClass
InstrumentingCompiler::MethodInvocationInfo::MethodInvocationInfoPerReceiverClass::MethodInvocationInfoPerSendingMethod
Integer::ModuloNumber
InterestConverter
JIRAClient
JSONTypeEncoder
JavaScriptCompiler::LoopDescription
JavaScriptCompiler::LoopDescriptionForBlock
JavaScriptCompletionEngine
JavaScriptEnvironment
JavaScriptEnvironment::AppletObject
JavaScriptEnvironment::AppletsObject
JavaScriptEnvironment::Document
JavaScriptEnvironment::DocumentObject
JavaScriptEnvironment::FormFieldObject
JavaScriptEnvironment::FormObject
JavaScriptEnvironment::FormsObject
JavaScriptEnvironment::HistoryObject
JavaScriptEnvironment::Math
JavaScriptEnvironment::WindowObject
JavaScriptSimulatedBrowserEnvironment
JavaScriptSourceReader
KeyboardForwarder
KeyboardProcessor
KeywordInContextIndexBuilder
Label::AnimatorState
Layout
LazyArray::UncomputedValue
Link
ListEntry
ListItemWrapper
ListModelView::Renderer
ListModelView::TableRenderer::ColumnDescriptor
ListView::HighlightArea
ListView::SearchSpec
Lookup
MIMETypeIconLibrary
MIMETypes
Magnitude
Math
MczInstaller
MemoryPolicy
MemoryUsageView::StatisticEntry
MenuBuilder
MenuItem
MenuPanel::Item
MenuPanel::Item::Adornment
MenuPanel::ScrollActivity
Message
MessageTally
MessageTracer
MessageTracer::MethodSpyInfo
MessageTracer::MethodTimingInfo
Method::MethodWhoInfo
Method::ParseTreeCacheEntry
Method::ParserCacheEntry
MethodFinder
MiniDebugger
MiniInspector
MiniLogger
MinimalShellInterface
MockMedium
Model
Monitor
MultiImage
NVTClient
NameResolver
NameSpace
NameSpaceOrganizer
NetNameResolver
NewLauncher::AddedToolInfo
NonInteractiveCompilerErrorHandler
NoteBookView::Tab
OSErrorHolder
OSProcess
OSProcess::ProcessListEntry
ObjectFileHandle
ObjectFileLoader
ObjectMemory
ObjectMemory::BinaryModuleDescriptor
OpaqueImage
OperationQueue
OperationQueue::OperationInQueue
OrderedDither
PackageId
PackageInfo
ParseNode
ParseNodeVisitor
Parser::Correction
Parser::ParsedAnnotation
ParserFlags
PassivityWrapper
PerforceSourceCodeManagementSettingsAppl::ModuleManager
PerforceSourceCodeManager::CheckInDefinition
PerforceSourceCodeManagerUtilities::WorkSpace
PerforceSourceCodeManagerUtilities::WorkSpace::View
PersistentFileHistory
PhoneticStringUtilities
PhoneticStringUtilities::PhoneticStringComparator
PluginSupport
PolymorphicInlineCache
Preferences
PresenterStyleSheet
PrintConverter
PrintfScanf
ProcessMonitorV2::ProcessItem
ProcessorScheduler
ProfileTree
ProgramNodeBuilder
ProgramNodeEnumerator
ProgrammingLanguage
Project
Project::ClassInfo
Project::MethodInfo
ProjectChecker
ProjectDefinition
ProjectDefinition::AbbrevEntry
ProjectDefinition::ApplicationDocumentTypeDescription
ProjectProblem
ProjectProblem::MethodCompilabilityIssue1::Error
ProjectProblem::MethodCompilabilityIssue1::Warning
Promise
ProtocolClient
RBComment
RBParser
RBProgramNode
RBProgramNode::AuxInfo
RBProgramNodeVisitor
RBStringReplacement
RBToken
RandomBlumBlumShub
RandomKISS
RandomKISS2
RandomMT19937
RandomParkMiller
RandomRDRand
RandomTT800
RasterOp
ReadEvalPrintLoop
ReadMe::ST80_ReadMe
RemoteImage
ReplyPresenter
ResourcePack::AutoUpdater
ResourcePack::AutoUpdater::CallbackUpdateTask
ResourcePack::AutoUpdater::ResourcePackUpdateTask
ResourceRetriever
STCCompilerInterface
Scanner
Scanner::Comment
Scanner::Directive
ScheduledControllers
ScrollValueHolder
ScrollWrapper
SelectionTracker
SequenceableCollectionSorter
Set::EmptySlot
Set::NilKey
SftpClient
SftpClient::SftpHandle
SftpClient::SftpPacketBuilder
SftpURI::WriteStreamSimulator
SharedPool
Signal
SimpleView::ViewShape
Singleton
SkipListNode
Smalltalk
SmartRefStream
SocketAddressInfo
SoundStream::CoreAudio::Device
SourceCodeCache
SourceCodeManagerUtilities
SourceFileLoader
SourceFileLoader::SourceFileReader
Squeak::CustomHelp
Squeak::DebugAction
Squeak::DebugSession
Squeak::GLMCompositePresentation
Squeak::GTExecuteSelectionDebugAction
Squeak::GTGenericStackDebugger
Squeak::GTInspectSelectionDebugAction
Squeak::GTPrintSelectionDebugAction
Squeak::TextAnchor
Squeak::TextColor
Squeak::TextEmphasis
Squeak::TextFontChange
Squeak::TextURL
Squeak::VersionBrowser
StandaloneStartup
Stdio
StoreSourceCodeManager::DBInfo
Stream
StrikeFont
StringCollationPolicy
StringHolder
StringPattern
StringPattern::Parser
StringUtilities
SubChannelInfoSpec
SunRPC::PortMapperServer::Mapping
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
SystemBrowser::BrowserHistoryEntry
SystemChangeNotifier
SystemDictionary
SystemEnvironment
SystemNavigation
SystemOrganization
SystemOrganizer
SystemUtils
SystemVersion
TSTreeNode
TTFontDescription::TTKernPair
TableData
TelnetClient
TerminalApplication::Recorder
TerminalSession
TextAttributes
TextClassifier
TextLines
TextList
TextStyle
TextView::ParenthesesMatcher
ThunderbirdComposeInterface
TimePeriod
TimeProfileBrowser
TimeZone
Timestamp::TimestampBuilderAbstract
ToolApplicationModel::HistoryEntry
Tools::BreakpointBrowser::BreakpointListEntry
Tools::BrowserList::SearchHandler
Tools::CachedTags
Tools::ChangeSetDiffInfo
Tools::ChangeSetDiffList::ListEntry
Tools::ChangeSetSpec
Tools::ClassChecker
Tools::ClassSorter
Tools::CodeCritics
Tools::CodeViewService
Tools::Diff2CodeView2::Diff2Data
Tools::Diff3CodeView2::Diff3Data
Tools::DiffCodeView2::DiffData
Tools::Inspector2Tab
Tools::LintAnnotation
Tools::LintHighlighter
Tools::MethodCategoryCache
Tools::MethodCategoryList::CachedMethodInfo
Tools::NavigationHistory
Tools::NavigationState
Tools::NewSystemBrowser::OwnershipGraph::RevisionOwnershipInfo
Tools::ProfilerInfoBuilder
Tools::SmalltalkDiffTool::DiffItem
Tools::Tag
Tools::TestRunnerMini::SuiteAndResult
Tools::TextMergeInfo
Tools::TextMergeInfo::LineInfo
Tools::Toolbox
Tools::VariableList::VariableEntry
TreeItem
Trie::SmallDictionaryWith1Element
Trie::SmallDictionaryWith2Elements
Trie::SmallDictionaryWith3Elements
TriggerButtonController
UILookPolicy
UIManager
UIPalette
UISpecVisitor
UISpecification
URI
URITransmission
URITransmissionService
URITransmissionServiceAppl::TransmissionRow
URL
UndefinedObject
UndefinedVariable
UndoSupport
UndoSupport::CompoundAction
UnitConverter
UnixOperatingSystem::ELFFileHeader
UnixOperatingSystem::FileDescriptorHandle
UnixOperatingSystem::FileStatusInfo
UnixOperatingSystem::MountInfo
UnixOperatingSystem::OSProcessStatus
UnixProcess
UserMessage
Utilities
V::Dynalink32
V::File
V::GDIDLL
V::OLEControlSitePane
V::OLEStructure
V::ViewManager
VAST::CwDataInterchangeConverter
VAST::CwGlobalMemoryTransferMechanism
VAST::CwMainWindow
VAST::CwPrimitive
VAST::CwTransferMechanism
VAST::CwWidget
VAST::OSComposite
VAST::OSDialogBox
VAST::SubApplication
VAST::System
VW5PackageExporter
Variable
VariablePanel::SnapAdornment
VersionDiffBrowser::FilterParameters
VersionInfo
Visitor
VoidObject
WeakReference
WebSocketStream::Frame
WebSocketStream::Message
WidgetWrapper
Win32Shell
WindowBuilder
WindowGroup
WindowSensor
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
XWorkstation::PseudoDeviceWithoutXFTSupport
XWorkstation::SelectionFetcher
XftFontDescription::FCFontListParser
ZipArchive
ZipArchive::ZipCentralDirectory
ZipArchive::ZipMember
|