eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Smalltalk':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Smalltalk


Inheritance:

   Object
   |
   +--Smalltalk

Package:
stx:libbasic
Category:
System-Support
Version:
rev: 1.1315 date: 2019/07/09 18:55:17
user: cg
file: Smalltalk.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Claus Gittinger

Description:


This is one of the central classes in the system;
it provides all system-startup, shutdown and maintenance support.
Also global variables are (conceptionally) kept here.

As you will notice, this is NOT a Dictionary
- my implementation of globals is totally different
  due to the need to be able to access globals from c-code as well,
  I do not use associations for globals, but instead keep the
  name<->value relations in the VM and access globals via utility
  functions found there.

However, it provides the known enumeration protocol.
It may change to become a subclass of collection at some time,
to inherit more collection stuff ...


[Instance variables:]
                                    none - all handling is done in the VM

[Class variables:]

    StartBlocks     <Collection>    blocks to be executed in a separate process after
                                    everything has been initialized. These blocks will
                                    be deleted after execution and therefore not be
                                    executed after an image restart. Initial processes
                                    (such as the Launcher) are usually started here.
                                    These blocks are added by smalltalk.rc/private.rc etc.
                                    via #addStartBlock during early initialization.

    ImageStartBlocks
                    <Collection>    blocks to be executed in a separate process after
                                    everything has been initialized. These blocks will be
                                    executed after an image restart.
                                    These blocks are usually added by smalltalk_r.rc etc.

    ExitBlocks      <Collection>    blocks to evaluate before system is
                                    left. Not currently used (GNU-ST compatibility).

    SystemPath      <Collection>    path to search for system files (sources, bitmaps etc)
                                    Set to a default here, but typically changed from some
                                    startup.rc file

    PackagePath     <Collection>    path to search for package.
                                    This is going to replace the above systemPath, and a classes
                                    resources will eventually searched in its package directory.
                                    This list defines the path, where packages are searched for,
                                    initially this is something like /opt/smalltalk/packages.
                                    Set to a default here, but typically changed from some
                                    startup.rc file

    StartupClass    <Class>         class and selector, where the system starts up
    StartupSelector <Symbol>        (right after VM initialization)
    StartupArguments <Array>        If an image is saved while those being nonNil,
                                    the image will come up there.
                                    Allows for customized images to be generated from a standard ST/X.
                                    StandAlone programs also set those during initialization.

    CommandLine          <String>   Unix (OS-) command line

    CommandName          <String>   the command (i.e. argv[0])

    CommandLineArguments <Array>    Unix (OS-) command line arguments broken into words
                                    CommandName has been stripped off.
                                    (initially set by the VM)

    SilentLoading   <Boolean>       OBSOLETE:
                                    suppresses messages during fileIn and in compiler
                                    (can be set to true from a customized main.c)

    VerboseLoading   <Boolean>      generate messages during fileIn and in compiler
                                    (can be set to true from a customized main.c)

    Initializing    <Boolean>       true while (re-)initializing
                                    Controls the behavior of certain error
                                    reporters (for example: suppress dialogBoxes)
                                    while the system is not yet fit for full operation.

    StandAlone      <Boolean>       true, if this is a standalone app;
                                    if true the process scheduler watches for
                                    which processes are still running, and
                                    exits ST/X, when the last non-background
                                    and non-system process exits.
                                    Can be set in an application-specific startup script,
                                    or, for standAlone programs, by C-code during initialization.

    HeadlessOperation               if true, a non-existing Display connection
                    <Boolean>       will NOT lead to an error-exit during startup.
                                    Default is false.
                                    Can be set in an application-specific startup script,
                                    or, for standAlone programs, by C-code during initialization.

    LogDoits        <Boolean>       if true, doits are also logged in the changes
                                    file. Default is false, since the changes file
                                    may become huge if every tiny doIt is saved there ...

    LoadBinaries    <Boolean>       if true, we attempt to load classes rom a binary
                                    file, if present. If false, this is always suppressed.

    SaveEmergencyImage <Boolean>    if true (the default), an emergency image
                                    is saved, if the main Display looses its
                                    connection. This is useful if you have a
                                    flaky display connection (serial line)
                                    and want to have your stuff saved automatically
                                    in case of a broken connection.

    IgnoreAssertions  <Boolean>     if true, assertions are ignored (i.e. no errors reported).
                                    Usually false in the development system, true in a standalone deployed app.

strictly private classVariables (helpers):

    CachedClasses   <Collection>    known classes (cached for faster class enumeration)

    CachedAbbreviations
                    <Dictionary>    className to filename mappings

    RealSystemPath  <Collection>    cached collection of directories along the path
                                    which really exist. Caching avoids long checks
                                    for existing directories on broken NFS volumes.

    SourcePath      <Collection>    cached names of really existing directories
                                    These are remembered, as in NFS systems,
    ResourcePath                    the time to lookup files may become long
    BinaryPath                      (especially, if some directories are on machines
    FileInPath                      which are not up ...).
                                    Therefore, the set of really
                                    existing directories is cached when the SystemPath
                                    is walked the first time.
                                    A consequence is that you have to invoke
                                    flushSystemPath, when you create any of those
                                    directories while running
                                    (and want the running ST/X to look there)


Related information:

    ObjectMemory
    StandaloneStartup
    GetOpt
    ReadEvalPrintLoop

Class protocol:

Compatibility-GNU
o  system: command
GNU-Smalltalk compatibility: execute an OS command

usage example(s):

     Smalltalk system:'ls'

Compatibility-Squeak
o  allClassesAndTraits
( an extension from the stx:libcompat package )
for squeak compatibility - currently, there are no traits

o  allClassesAndTraitsDo: aBlock
( an extension from the stx:libcompat package )
for squeak compatibility - currently, there are no traits

o  allTraits
( an extension from the stx:libcompat package )

o  beep
output an audible beep or bell

o  garbageCollect
for Squeak compatibility

o  garbageCollectMost
collect recently created garbage; return the amount of freeSpace.
In ST/X, only the newSpace is collected here, and the sum of
newSpace + freeListSpace is returned.

o  globals
( an extension from the stx:libcompat package )

o  isMorphic

o  logChange: aString
( an extension from the stx:libcompat package )
Nothing to do

o  os
( an extension from the stx:libcompat package )
return the operating system

usage example(s):

     Smalltalk os -> Win32OperatingSystem

o  platformName
not yet fully implemented (I have to figure out, what squeak returns in each case...)

usage example(s):

     Smalltalk platformName -> 'Win32'

o  registerExternalObject: anObject
( an extension from the stx:libcompat package )
Register the given object in the external objects array and return its index.
If it is already there, just return its index.
ExternalObjects are protected from GC and can be accessed easily from
primitive code (via the global Smalltalk:SpecialObjectArray)

o  removeClassNamed: aName
Invoked from fileouts: if there is currently a class in the system named aName, then remove it.
Also needed by the refactory browser.
If anything untoward happens, report it in the Transcript.

o  renameClassNamed: oldName as: newName
( an extension from the stx:libcompat package )

o  unregisterExternalObject: anObject
( an extension from the stx:libcompat package )
Unregister the given object in the external objects array.
Do nothing if it isn't registered.

o  windowSystemName
( an extension from the stx:libcompat package )
not yet fully implemented (I have to figure out, what squeak returns in each case...)

usage example(s):

     Smalltalk windowSystemName
				-> 'Win32'

Compatibility-V'Age
o  allClassesImplementing: aSelector

o  declareConstant: constantName poolName: poolNameArg value: value
visualAge compatible pool variable declaration.
called when a V'age application is filed in
(or one of its changes is accepted via the change browser)

o  declarePoolDictionary: poolDictionaryNameArg
visualAge compatible pool declaration.
called when a V'age application is filed in
(or one of its changes is accepted via the change browser)

o  declareVariable: varName poolName: poolNameArg
visualAge compatible pool declaration.
called when a V'age application is filed in
(or one of its changes is accepted via the change browser)

Compatibility-VW
o  defineClass: nameSymbol superclass: superclass indexedType: indexed private: private instanceVariableNames: instVars classInstanceVariableNames: classInstVars imports: imports category: category

o  defineClass: nameSymbol superclass: superclass indexedType: indexed private: private instanceVariableNames: instVars classInstanceVariableNames: classInstVars imports: imports category: category attributes: annotations

o  defineNameSpace: nameSymbol private: private imports: imports category: category
what to do ?

o  dialectName
Smalltalk dialectName

o  dialectReleaseVersion
Smalltalk dialectReleaseVersion

accessing
o  associationAt: aKey
return a key-value association for aKey.
Since ST/X's Smalltalk as no real dictionary, this is
simulated here.

o  associationAt: aKey ifAbsent: exceptionBlock
return a key-value association for aKey, or the value
from exceptionBlock, if no such key is present.
Since ST/X's Smalltalk as no real dictionary, this is simulated here.
Warning: this is a compatibility interface only, with a different semantic as
the original ST80 implementation. The returned assoc is created on the fly,
and not the one stored in the receiver (there are not assocs there)

o  at: aKey
retrieve the value stored under aKey, a symbol.
Return nil if not present
(this will be changed to trigger an error - better use #at:ifAbsent:)

o  at: aKey ifAbsent: aBlock
retrieve the value stored at aKey.
If there is nothing stored under this key, return the value of
the evaluation of aBlock.

usage example(s):

     Smalltalk removeKey:#fooBar.
     Smalltalk at:#fooBar                       <- returns nil
     Smalltalk at:#fooBar ifAbsent:['sorry']    <- no error

o  at: aKey ifAbsentPut: aBlock
return the element indexed by aKey if present,
if not present, store the result of evaluating valueBlock
under aKey and return it.

o  at: aKey ifPresent: aBlock
try to retrieve the value stored at aKey.
If there is nothing stored under this key, do nothing.
Otherwise, evaluate aBlock, passing the retrieved value as argument.

usage example(s):

     Smalltalk at:#fooBar ifPresent:[:what | Transcript showCR:what].
     Smalltalk at:#Object ifPresent:[:what | Transcript showCR:what].

     Smalltalk at:#fooBar put:nil.
     Smalltalk at:#fooBar ifPresent:[:what | Transcript showCR:what].

o  at: aKey put: aValue
store the argument aValue under aKey, a symbol.
Return aValue (sigh).

o  includesKey: aKey
return true, if the key is known

o  keyAtValue: anObject
return the symbol under which anObject is stored - or nil.
This is a slow access, since the receiver is searched sequentially.
NOTICE:
The value is searched using identity compare

usage example(s):

Smalltalk keyAtValue:Object

o  keyAtValue: anObject ifAbsent: exceptionValue
return the symbol under which anObject is stored - or the value from exceptionValue.
This is a slow access, since the receiver is searched sequentially.
NOTICE:
The value is searched using identity compare

usage example(s):

     Smalltalk keyAtValue:Object ifAbsent:#foo
     Smalltalk keyAtValue:1234 ifAbsent:#foo

o  keys
return a collection with all keys in the Smalltalk dictionary

o  removeKey: aKey
remove the association stored under the key-argument from the globals dictionary.
WARNING:
this is somewhat dangerous: conceptionally, the association is removed,
to which machine & byte compiled code refers if it accesses a global.
If there are still global accesses in some literalArray or from machine-compiled code,
it continues to reference the globals value via that obsolete association and gets a nil
value. (which is correct)
However, if that global is later reintroduced, a new association will be created and
the new global now referenced via the new association.
The old accesses will still see nil, although the globals value is actually non-nil
(this is questionable).
To avoid this problem, the #removeClass: method never removed the key.

o  startBlocks

o  values
return a collection with all values in the Smalltalk dictionary

browsing
o  browseAllCallsOn: aSelectorSymbol
startup a browser for all methods sending a particular message

usage example(s):

     Smalltalk browseAllCallsOn:#at:put:

o  browseAllSelect: aBlock
startup a browser for all methods for which aBlock returns true

usage example(s):

     Smalltalk browseAllSelect:[:m | m literals isNil]

o  browseChanges
startup a changes browser

usage example(s):

     Smalltalk browseChanges

o  browseClass: aClass
startup a browser on aClass.
The broser will only show that class (i.e. be a singleClass-browser).
See browseInClass: for a full browser, which has aClass selected initially.

usage example(s):

     Smalltalk browseClass:Array

o  browseImplementorsMatching: aSelectorSymbolOrMatchPattern
startup a browser for all methods implementing a message matching

usage example(s):

     Smalltalk browseImplementorsOf:#'at:put:'
     Smalltalk browseImplementorsMatching:#'at:*'

o  browseImplementorsOf: aSelectorSymbol
startup a browser for all methods implementing a particular message

usage example(s):

     Smalltalk browseImplementorsOf:#at:put:

o  browseInClass: aClass
startup a full browser showing aClass.
The browser will be a full browser with aClass initially selected.
See browseClass: for a singleClass browser, which shows only a single class.

usage example(s):

     Smalltalk browseInClass:Array

o  browseInClass: aClass selector: selector
startup a full browser showing aClass>>selector.
The browser will be a full browser with aClass initially selected.
See browseClass: for a singleClass browser, which shows only a single class.

usage example(s):

     Smalltalk browseInClass:Array selector:#at:

class management
o  basicRemoveClass: aClass
remove the argument, aClass from the smalltalk dictionary;
we have to flush the caches since these methods are now void.
Also, class variables of aClass are removed.

o  changeCategoryOf: aClass to: newCategory
change a classes category, add a change record,
send change notifications

usage example(s):

     Smalltalk changeCategoryOf:NewApplication to:#myApplications

o  defineNameSpace: name private: private imports: imports category: category attributes: annotations

o  flushCachedClass: aClass

o  flushCachedClasses
Smalltalk flushCachedClasses

o  removeClass: aClass
remove the argument, aClass from the smalltalk dictionary;
we have to flush the caches since these methods are now void.
Also, class variables of aClass are removed.
Recompile accessors to aClass.

o  removeClasses: aCollectionOfClasses
remove aCollectionOfClasses from the smalltalk dictionary;
we have to flush the caches since these methods are now void.
Also, class variables of aClass are removed.
Recompile accessors to the classes - after all classes in the collection have been removed.

o  renameClass: aClass to: newName
rename aClass to newName. Most of the work is in
renaming the classVariables (create & copy over values)
and patching the classes methods to access the new variables.

copying
o  deepCopy
redefined to return self - there is only one Smalltalk dictionary

o  deepCopyUsing: aDictionary postCopySelector: postCopySelector
return a deep copy of the receiver.
Redefined to return the receiver - there is only one Smalltalk dictionary

o  shallowCopy
redefined to return self - there is only one Smalltalk dictionary

o  simpleDeepCopy
redefined to return self - there is only one Smalltalk dictionary

debugging ST/X
o  compileTrace: aBoolean
dump generated inline code (NOOP if VM was compiled without the trace-debug option)

usage example(s):

     Smalltalk compileTrace:true
     Smalltalk compileTrace:false

o  debugBreakPoint
call the dummy debug function, on which a breakpoint
can be put in adb, sdb, dbx or gdb.
WARNING: this method is for debugging only
it will be removed without notice.

o  exitWithCoreDump
abort the program and dump core

usage example(s):

Be careful evaluating this:
     Smalltalk exitWithCoreDump

o  fatalAbort
report a fatal-error, print a stack backtrace and exit with core dump.
(You may turn off the stack print with debugPrinting:false)

o  fatalAbort: aMessage
report a fatal-error; print a stack backtrace and exit with core dump
(You may turn off the stack print with debugPrinting:false)

o  ignoreHalt
return true, if halts are ignored.
Usually, this is done in standAlone applications

o  ignoreHalt: aBoolean
control if halts are to be ignored;
usually, this is done in standAlone applications

usage example(s):

     Smalltalk ignoreHalt:true.
     self halt.
     Smalltalk ignoreHalt:false.
     self halt.

o  silent
returns the Silent class variable.

o  verbose

o  verbose: aBoolean

o  vmInstructionTrace: aBoolean

enumerating
o  allBehaviorsDo: aBlock
evaluate the argument, aBlock for all classes and metaclasses in the system

usage example(s):

     Smalltalk allBehaviorsDo:[:aClass | aClass name printCR]

o  allClassCategories
return a set of all class categories in the system

usage example(s):

     Smalltalk allClassCategories

o  allClassesAndMetaclassesDo: aBlock
evaluate the argument, aBlock for all classes and metaclasses in the system.

o  allClassesDo: aBlock
evaluate the argument, aBlock for all classes in the system.
Enumerates non-meta classes only - not metaclasses

usage example(s):

     Smalltalk allClassesDo:[:aClass | aClass name printCR]

o  allClassesForWhich: filter
return a collection with all classes in the system,
for which filter evaluates to true.
Enumerates non-meta classes only - not metaclasses

usage example(s):

     Smalltalk
	allClassesForWhich:[:cls | cls name startsWith:'Po']

o  allClassesForWhich: filter do: aBlock
evaluate the argument, aBlock for all classes in the system, for which filter evaluates to true.
Enumerates non-meta classes only - not metaclasses

usage example(s):

     Smalltalk
	allClassesForWhich:[:cls | cls name startsWith:'Po']
	do:[:aClass | Transcript showCR:aClass name]

o  allClassesInCategory: aCategory
return a collection of for all classes in aCategory;
The order of the classes is not defined.

usage example(s):

     Smalltalk allClassesInCategory:'Views-Basic'

o  allClassesInCategory: aCategory do: aBlock
evaluate the argument, aBlock for all classes in the aCategory;
The order of the classes is not defined.

usage example(s):

     Smalltalk allClassesInCategory:'Views-Basic' do:[:aClass | Transcript showCR:aClass]

o  allClassesInCategory: aCategory inOrderDo: aBlock
evaluate the argument, aBlock for all classes in aCategory;
superclasses come first - then subclasses

usage example(s):

     Smalltalk allClassesInCategory:'Views-Basic' inOrderDo:[:aClass | aClass name printCR]

o  allClassesInOrderDo: aBlock
evaluate the argument, aBlock for all classes in the system;
Evaluation order is by inheritance: superclasses come first.

usage example(s):

     Smalltalk allClassesInOrderDo:[:aClass | Transcript showCR:aClass name]

o  allClassesInPackage: aPackageID
evaluate the argument, aBlock for all classes in a package;
The order of the classes is not defined.
The returned collection may include private classes

usage example(s):

     Smalltalk allClassesInPackage:'bosch:dapasx'

o  allClassesInPackage: aPackageID do: aBlock
evaluate the argument, aBlock for all classes in a package;
The order of the classes is not defined.

usage example(s):

     Smalltalk allClassesInPackage:'bosch:dapasx' do:[:aClass | Transcript showCR:aClass]

o  allClassesMatchingCategory: aCategoryPattern
return a collection of for all classes matching aCategoryPattern;
The order of the classes is not defined.

usage example(s):

     Smalltalk allClassesInCategory:'Collections-Arrayed'
     Smalltalk allClassesMatchingCategory:'Collections-*'

o  allClassesMatchingPackage: aPackageIDPattern
evaluate the argument, aBlock for all classes matching packagePattern;
The order of the classes is not defined.
The returned collection may include private classes

usage example(s):

     Smalltalk allClassesInPackage:'exept:bridgeFramework'
     Smalltalk allClassesMatchingPackage:'exept:bridgeFramework*'

o  allKeysDo: aBlock
evaluate the argument, aBlock for all keys in the Smalltalk dictionary

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  allMethodCategories
return a set of all method-categories (protocols) in the system

usage example(s):

     Smalltalk allMethodCategories

o  allMethodsDo: aBlock
enumerate all methods in all classes

o  allMethodsForWhich: aBlock
return a collection of methods for which aBlock returns true

usage example(s):

     Smalltalk allMethodsForWhich:[:m | m isObsolete].

     Smalltalk allMethodsForWhich:#isObsolete.

o  allMethodsForWhich: aCheckBlock do: actionBlock
enumerate methods for which aCheckBlock returns true

usage example(s):

     Smalltalk allMethodsForWhich:[:m | m isObsolete] do:[:m | Transcript showCR:m].

     Smalltalk allMethodsForWhich:#isObsolete do:[:m | Transcript showCR:m].

o  allMethodsWithSelectorDo: aTwoArgBlock
enumerate all methods in all classes and evaluate aBlock
with method and selector as arguments.

o  associationsDo: aBlock
evaluate the argument, aBlock for all key/value pairs
in the Smalltalk dictionary

usage example(s):

Smalltalk associationsDo:[:assoc | assoc printCR]

o  basicKeys
for rel > 5 only

o  do: aBlock
evaluate the argument, aBlock for all values in the Smalltalk dictionary

o  keysAndValuesDo: aBlock
evaluate the two-arg block, aBlock for all keys and values

o  keysAndValuesSelect: selectBlockWith2Args thenCollect: collectBlockWith2Args
Smalltalk
keysAndValuesSelect:[:nm :val | (nm startsWith:'Ab') and:[val notNil]]
thenCollect:[:nm :val | nm]

o  keysDo: aBlock
evaluate the argument, aBlock for all keys in the Smalltalk dictionary

initialization
o  basicInitializeSystem
initialize all other classes.
This one is the very first entry into the smalltalk world
[with error handling, via the initializeSystem],
right after startup, usually immediately followed by Smalltalk>>start.

Notice:
this is NOT called when an image is restarted; in this
case the show starts in Smalltalk>>restart.

usage example(s):

'basicInitializeSystem' infoPrintCR.

o  initGlobalsFromEnvironment
setup globals from the shell-environment

usage example(s):

     Smalltalk initGlobalsFromEnvironment

o  initInterrupts
initialize interrupts

usage example(s):

     Smalltalk initInterrupts

o  initStandardStreams
initialize some well-known streams

usage example(s):

     Smalltalk initStandardStreams

o  initStandardTools
predefine some tools which we might need later
- if the view-classes exist,
they will redefine Inspector and Debugger for graphical interfaces

usage example(s):

     Smalltalk initStandardTools

o  initSystemPath
setup path where system files are searched for.
the default path is set to:
.
<directory of exe> (WIN32 only)
$HOME (if defined)
$HOME/.smalltalk (if defined & existing)
$SMALLTALK_LIBDIR (if defined & existing)
$STX_LIBDIR (if defined & existing)
$STX_TOPDIR (if defined & existing)
REGISTRY('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\<CurrentVersion>\LibDir') (WIN32 only)
REGISTRY('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\LibDir') (WIN32 only)
<standard places>

standard places (unix):
/opt/smalltalk/<release> (if existing)
/opt/smalltalk (if existing)
/usr/local/lib/smalltalk (if existing)
/usr/lib/smalltalk (if existing)
/lib/smalltalk (if existing)

win32:
\programs\exept\smalltalk (if existing)
\programs\smalltalk (if existing)
\smalltalk (if existing)

vms:
$stx:lib (if existing)
$stx:root (if existing)

of course, it is possible to add entries from the 'smalltalk.rc'
startup file; add expressions such as:
Smalltalk systemPath addFirst:'/foo/bar/baz'.
or:
Smalltalk systemPath addLast:'/fee/foe/foo'.

However, smalltalk.rc itself must be found along the above path.

usage example(s):

     Smalltalk initSystemPath
     Smalltalk systemPath

     SystemPath := nil.
     PackagePath := nil.
     OperatingSystem defaultSystemPath
     OperatingSystem defaultPackagePath

o  initUserPreferences
setup other stuff

o  initializeClass: aClass
sent from VM via #initializeModules

o  initializeModules
perform module specific initialization and
send #initialize to all classes.
Notice: this is NOT called when an image is restarted

o  initializeModulesOnce
perform module specific initialization and
send #initialize to all classes.
Notice: this is not called when an image is restarted

o  initializeSystem
initialize all classes; setup dispatcher processes etc.
This one is the very first entry into the smalltalk world,
right after startup, usually immediately followed by Smalltalk>>start.
Here, a few specific initializations are done, then the actual initialization is
done inside an error handler in basicInitializeSystem.
Notice:
this is called by the VM's main entry. You will not find senders from Smalltalk.
Also Notice:
this is NOT called when an image is restarted;
in this case the show starts in Smalltalk>>restart.

o  initializeVerboseFlags
reinterpret those, in case given after the VM options.

o  isInitialized
this returns true, if the system is properly initialized;
i.e. false during startup.
Especially, the whole display/viewing stuff and process escheduling
is not working correctly until initialized.

o  reinitStandardStreams
reinitialize some well-known streams.
Tis must be done very early during startup, to allow for
debug and trace messages to be output
(otherwise, the file-descriptors are invalid)

message control
o  silentLoading
returns the Silentloading class variable, which globally controls if compilation
messages are shown on the transcript during a fileIn.

o  silentLoading: aBoolean
allows access to the Silentloading class variable, which controls
messages (especially during fileIn) onto the transcript.
You can save a snapshot with this flag set to true, which makes
the image come up silent. Can also be set, to read in files unlogged.

o  silentlyLoadingDo: aBlock
evaluates aBlock with silent loading on - no compilation messages (except errors)
are shown on the transcript

misc accessing
o  beHeadless: aBoolean
set/clear the headlessOperation flag.

o  beSTScript: aBoolean
set/clear the isSTScript flag.

o  standAloneApp: aBoolean
set/clear the StandAlone flag.

misc ui support
o  inspectorClass
( an extension from the stx:libtool package )
redefined to use DictionaryInspector
(instead of the default Inspector).

private-system management-packages
o  basicLoadPackage: aPackageString fromDirectory: packageDirOrStringOrNil asAutoloaded: doLoadAsAutoloaded
load a package referenced by aPackageString - a string like 'stx:libbasic'.
The package is either located in packageDirOrStringOrNil, or in the current directory (if nil).
Answer true, if the load succeeded, false if it failed

o  loadExtensionsForPackage: aPackageId
evaluating or here - want all extensions to be loaded

o  loadExtensionsForPackage: aPackageId language: programmingLanguage
do not try again

o  loadExtensionsFromDirectory: packageDirOrString
evaluating or here - want all extensions to be loaded

o  loadExtensionsFromDirectory: packageDirOrString language: language
false

o  loadPackage: aPackageStringArg asAutoloaded: doLoadAsAutoloaded
make certain, that some particular package is loaded into the system.
Return true on success, false otherwise.

usage example(s):

a little convenience: so you can stx packages with loadPackage:'goodies/soap'

o  loadPackage: packageId fromAllSourceFilesInDirectory: aDirectory
load all source files found in aDirectory and treat them like
a package. Allows for initial import of alien ST-code as a new package.
Experimental.

o  loadPackage: packageId fromClassLibrary: aFilename
load a package from a compiled classLib.
Raise an error if not ok (only returns false if the error is proceeded)
Experimental.

o  loadPackage: aPackageString fromDirectory: packageDirOrStringOrNil asAutoloaded: doLoadAsAutoloaded
load a package referenced by aPackageString - a string like 'stx:libbasic'.
The package is either located in packageDirOrStringOrNil, or in the current directory (if nil).
Answer true, if the load succeeded, false if it failed

usage example(s):

     Smalltalk loadPackage:'stx:goodies/communication'

o  loadPackage: packageId fromLoadAllFile: aFilename
load a package from a loadAll - loader script.
Experimental.

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  loadPackage: aPackageId fromZIPArchive: f asAutoloaded: doLoadAsAutoloaded
load a package from a .zip delivery file.
Experimental.

o  loadPackageFromAbbrevFile: aPackageId asAutoloaded: doLoadAsAutoloaded
abbrev.stc ?

** This is an obsolete interface - do not use it (it may vanish in future versions) **

queries
o  allClasses
return an unordered collection of all classes in the system.
Only globally anchored classes are returned
(i.e. anonymous ones have to be acquired by Behavior allSubInstances).
Enumerates non-meta classes only - not metaclasses

usage example(s):

     CachedClasses := nil.
     Smalltalk allClasses

    to get the list sorted by name:

     Smalltalk allClasses asSortedCollection:[:a :b | a name < b name]

o  allClassesAndMetaclasses
return an unordered collection of all classes with their metaclasses in the system.

o  allClassesWithAllPrivateClasses
return an unordered collection of all classes in the Smalltalk namespace.
Only globally anchored classes are returned; Namespaces are not included.
(i.e. anonymous ones have to be acquired by Behavior allSubInstances)

usage example(s):

     Smalltalk allClassesWithAllPrivateClasses

o  allExtensions
return a collection of all extension methods (methods added from another package)

usage example(s):

     Smalltalk allExtensions

o  allExtensionsForPackage: aProjectID
return a collection of all extension methods for a given projectID

o  allImplementorsOf: aSelector
return a collection of classes which implement the given selector

usage example(s):

     Smalltalk allImplementorsOf:#isNil
     (Smalltalk allImplementorsOf:#add:) size

o  allImplementorsOf: aSelector do: aBlock
enumerate all classes which implement the given selector

usage example(s):

     Smalltalk allImplementorsOf:#isNil do:[:cls | Transcript showCR:cls]
     Smalltalk allImplementorsOf:#add: do:[:cls | Transcript showCR:cls]

o  allLoadedPackageIDs
Smalltalk allLoadedPackageIDs

o  allLoadedProjectIDs
Smalltalk allLoadedProjectIDs


** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  allPackageIDs
Smalltalk allPackageIDs

o  allPackageIdsIncludingUnloadedClasses: includeUnloadedClasses
Returns all package ids.
Excludes packages coming from unloaded classes if includeUnloadedClasses is false.

o  allProjectIDs
Smalltalk allProjectIDs


** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  allProjectsIdsIncludingUnloadedClasses: includeUnloadedClasses
Returns all projects ids.
Excludes projects coming from unloaded classes if includeUnloadedClasses is false.


** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  cellAt: aName
return the address of a global cell
- used internally for compiler only

o  classCategoryCompletion: aPartialCategory
given a partial class category name, return an array consisting of
2 entries: 1st: the best (longest) match
2nd: collection consisting of matching categories

usage example(s):

     Smalltalk classCategoryCompletion:'Sys'
     Smalltalk classCategoryCompletion:'System'
     Smalltalk classCategoryCompletion:'System-BinaryStorage'

o  classNamed: aString
return the class with name aString, or nil if absent.
To get to the metaClass, append ' class' to the string.
To get a nameSpace or private class, prefix the name as required.
If a private class of an autoloaded class is referenced, the owning class
will be loaded.

usage example(s):

     Smalltalk classNamed:'Object'
     Smalltalk classNamed:'Authentication::BasicAuthenticator::BasicAuthenticationData'
     Smalltalk classNamed:'Authentication::BasicAuthenticator::BasicAuthenticationData class'
     Smalltalk classNamed:'Authentication::BasicAuthenticator'
     Smalltalk classNamed:'fooBar'
     Smalltalk classNamed:'true'
     Smalltalk classNamed:'Object class'
     Smalltalk classNamed:'Metaclass'
     Smalltalk classNamed:'Array'
     Smalltalk classNamed:'Array class'

o  classNames
return a collection of all classNames in the system

usage example(s):

     Smalltalk classNames

o  classnameCompletion: aPartialClassName
given a partial classname, return an array consisting of
2 entries: 1st: the best (longest) match
2nd: collection consisting of matching names

o  classnameCompletion: aPartialClassName inEnvironment: anEnvironment
given a partial classname, return an array consisting of
2 entries: 1st: the best (longest) match
2nd: collection consisting of matching names

usage example(s):

     Smalltalk classnameCompletion:'Arr'
     Smalltalk classnameCompletion:'Arra'
     Smalltalk classnameCompletion:'arra'
     Smalltalk classnameCompletion:'*rray'

     Smalltalk classnameCompletion:'Arr cl'
     Smalltalk classnameCompletion:'*rray cl'

o  defaultNameSpace
return the default namespace, where new classes are installed,
if NO special nameSpace handler is present

o  globalNameCompletion: aPartialGlobalName
given a partial globalName, return an array consisting of
2 entries: 1st: the best (longest) match
2nd: collection consisting of matching names

o  globalnameCompletion: aPartialGlobalName
given a partial globalName, return an array consisting of
2 entries: 1st: the best (longest) match
2nd: collection consisting of matching names

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  hasClassNamed: aString

o  hasNameSpaces
can be redefined by dummy namespaces/environments, to suppress
the namespace display in a browser (PocketSmalltalk)

o  hasNamespaces
can be redefined by dummy namespaces/environments, to suppress
the namespace display in a browser (PocketSmalltalk)

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  hasSelectorNameSpaces
for now return false
Selector namespaces are being implemented and supported by the VM,
but not yet fully supported by all tools...
Therefore, for now, do not generate code which uses this feature.

o  includes: something
this should come from Collection.
will change the inheritance - Smalltalk is actually a collection

o  includesIdentical: something
this should come from Collection.
will change the inheritance - Smalltalk is actually a collection

o  isBrowserStartable
(comment from inherited method)
return true, if this is an application class,
which can be started from the browser

o  isNameSpace
return true, if the receiver is a nameSpace.

o  isRealNameSpace
return true, if the receiver is a nameSpace, but not Smalltalk (which is also a class).

o  isTopLevelNameSpace

o  isTopLevelNamespace
obsolete - use isTopLevelNameSpace

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  keyIsClassVariableNameKey: aKey
self keyIsClassVariableNameKey:'foo::bar'
self keyIsClassVariableNameKey:'foo:bar'
self keyIsClassVariableNameKey:':bar'
self keyIsClassVariableNameKey:'::bar'

o  loadedClassNamed: aString
Same as #classNamed,
but a private class of an autoloaded class will not be found.

usage example(s):

     Smalltalk loadedClassNamed:'Object'
     Smalltalk loadedClassNamed:'Authentication::BasicAuthenticator::BasicAuthenticationData'
     Smalltalk loadedClassNamed:'Authentication::BasicAuthenticator::BasicAuthenticationData class'
     Smalltalk loadedClassNamed:'Authentication::BasicAuthenticator'
     Smalltalk loadedClassNamed:'fooBar'
     Smalltalk loadedClassNamed:'true'
     Smalltalk loadedClassNamed:'Object class'
     Smalltalk loadedClassNamed:'Metaclass'
     Smalltalk loadedClassNamed:'Array'
     Smalltalk loadedClassNamed:'Array class'

o  methodProtocolCompletion: aPartialProtocolName
given a partial method protocol name, return an array consisting of
2 entries: 1st: the best (longest) match
2nd: collection consisting of matching protocols

usage example(s):

     Smalltalk methodProtocolCompletion:'doc'
     Smalltalk methodProtocolCompletion:'docu'
     Smalltalk methodProtocolCompletion:'documenta'

o  numberOfGlobals
return the number of global variables in the system

usage example(s):

Smalltalk numberOfGlobals

o  referencesAny: aCollection
redefined, since the references are only kept in the VM's symbol table

o  referencesDerivedInstanceOf: aClass
redefined, since the references are only kept in the VM's symbol table

o  referencesInstanceOf: aClass
redefined, since the references are only kept in the VM's symbol table

o  referencesObject: anObject
redefined, since the references are only kept in the VM's symbol table

o  resolveName: aName inClass: aClass
resolve aName as if compiled within aClass;
i.e. if it has a private class with this name, return it;
if aName is known within the classes namespace, return that.
Otherwise, return a global with that name.
This should be used whereever Smalltalk>>at: used to be used,
to resolve a global by name.

o  selectorCompletion: aPartialSymbolName
given a partial selector, return an array consisting of
2 entries: 1st: the longest match
2nd: collection consisting of matching implemented selectors

o  selectorCompletion: aPartialSymbolName inEnvironment: anEnvironment
given a partial selector, return an array consisting of
2 entries: 1st: the longest match
2nd: collection consisting of matching implemented selectors

usage example(s):

     Smalltalk selectorCompletion:'at:p'
     Smalltalk selectorCompletion:'nextP'
     Smalltalk selectorCompletion:'nextp'

o  someImplementorOf: aSelector
return any class, which implement the given selector. Nil if there is none.
(useful to search, if there is one at all)

usage example(s):

     Smalltalk someImplementorOf:#isNil
     Smalltalk someImplementorOf:#add:

queries-system
o  isAmber
is this an Amber Smalltalk system ?
Return false here - this may be useful to write portable
applications - add #isAmber to your Amber Smalltalk,
returning true there.

o  isDolphinSmalltalk
is this a Dolphin Smalltalk system ?
Return false here - this may be useful to write portable
applications - add #isDolphinSmalltalk to your dolphin,
returning true there.

o  isGemStone
is this a GemStone Smalltalk system ?
Return false here - this may be useful to write portable
applications - add #isGemStone to your GemStone/S,
returning true there.

o  isPharo
is this a Pharo Smalltalk system ?
Return false here - this may be useful to write portable
applications - add #isPharo to your Pharo,
returning true there.

o  isSmalltalkMT
is this a Smalltalk-MT system ?
Return false here - this may be useful to write portable
applications - add #isSmalltalkMT to your smalltalk-MT,
returning true there.

o  isSmalltalkV
is this a Smalltalk/V system ?
Return false here - this may be useful to write portable
applications - add #isSmalltalkV to your smalltalkV,
returning true there.

o  isSmalltalkX
is this a Smalltalk/X system ?
Return true here - this may be useful to write portable
applications.
Add #isSmalltalkX to your other smalltalks, returning false there.
Notice: the ST/X compilers know about this, and inline the code
(not generating code for the false branch).
So in ST/X, this check costs you absolutely nothing.

o  isSqueak
is this a SqueakSmalltalk system ?
Return false here - this may be useful to write portable
applications - add #isSqueak to your squeak,
returning true there.

o  isSqueakLike
is this a Squeak, Pharo, Cuis or similar Smalltalk system ?
Return false here - this may be useful to write portable
applications - add #isSqueakLike to your squeak, pharo,...
returning true there.

o  isVisualAge
is this a VisualAge Smalltalk system ?
Return false here - this may be useful to write portable
applications - add #isVisualAge to your visualAge,
returning true there.

o  isVisualSmalltalkEnterprise
is this a VSE Smalltalk system ?
Return false here - this may be useful to write portable
applications - add #isVisualSmallalkEnterprise to your VSE,
returning true there.

o  isVisualWorks
is this a VisualWorks Smalltalk system ?
Return false here - this may be useful to write portable
applications - add #isVisualWorks to your visualWorks,
returning true there.

startup
o  browserWindowStartup
invoked, when st/x is started as a plugin in a (currently firefox) browser.
In contrast to squeak (where a single window is used to show the display bitmap),
the browser window is used as a pseudo root-window for a single aplication window.
If required, that app must ensure that multiple apps (if any) are setup as a
multiwindow application.
Actually, control is transferred to PluginSupport, which is suppoesed to know what to do

o  defineCommandLineAsWorkspaceVariablesForScripts
enable this, so we can provide _$1.._$n in the script

o  displayInitializationDone
inform the restart, that the display has been initialized

o  executeStartBlocks

o  hideSplashWindow

o  lateOpenDisplay
this is called when a view is opened without a display being already opened.

o  mainStartup: graphicalMode
common start/restart action, if there is a Display, initialize it
and start dispatching; otherwise go into a read-eval-print loop.

o  openDisplay
try to open a display connection.
If so, also read display- and keyboard.rc

o  providingDisplayDo: aBlock
provide a Display, if needed

o  readEvalPrintLoop
say hello, then go into a read-eval-print loop

o  restart
startup after an image has been loaded;
This is called by the VM's main entry - you should not find senders from Smalltalk.

there are three change-notifications made to dependents of ObjectMemory,
which allow a stepwise re-init: #earlyRestart, #restarted and #returnFromSnapshot.

#earlySystemInstallation is sent for ST80 compatibility

#earlyRestart is send first, nothing has been setup yet.
(should be used to flush all device dependent entries)

#restarted is send right after.
(should be used to recreate external resources (fds, bitmaps etc)

#returnFromSnapshot is sent last
(should be used to restart processes, reOpen Streams which cannot
be automatically be reopened (i.e. Sockets, Pipes) and so on.
(Notice that positionable fileStreams are already reopened and repositioned)

usage example(s):

because the Processor may restart processes which use

usage example(s):

reinitialize the Processor - restartable processes

usage example(s):

are now restarted here (but not yet scheduled).

usage example(s):

reinstall Transcript, if not changed during restart.

usage example(s):

reinitialization (restart) of Display is normally performed

usage example(s):

in the restart script. If this has not been run for some reason,

usage example(s):

reinstall Transcript, if not changed during restart.

o  showSplashMessage: aString
put the message into the splash screen (if there is one).
Use this for messages during startup

o  showSplashMessage: aMessageStringOrNil color: rgbValueOrNil
put the message into the splash screen (if there is one).

o  splashInfo: aString
like infoPrintCR,
but in addition put the message into the splash screen (if there is one).
Use this for info messages during startup

o  start
low level entry from the VM's main.
After initializeSystem, this is the very first real entry into the Smalltalk world.
Analyzes the command line and checks what to do
(i.e. script/repl/eval or full blown IDE).
Also handles --load and various debug options.
Caveat:
this has become too complicated and desperately needs a rewrite.

Also:
Be very careful when changing things here;
especially be careful to ensure that the scripting options are robust against any
missing packages; so the error handlers should not depend on any stream, logger etc. features.

usage example(s):

read startup and patches file

usage example(s):

this will force fileIn of filename only, no standard startup.

usage example(s):

E, P and F this will force evaluation of expr only, no standard startup

usage example(s):

self startSchedulerAndBackgroundCollector.

usage example(s):

('Smalltalk [error]: startup file "', commandFile, '" not found.') errorPrintCR.

usage example(s):

JV@2011-11-01: DO NOT check defaultRC exist - this prevents smalltalk to
                    to be started with different working directory than stx/projects/smalltalk !!!

usage example(s):

ObjectMemory startBackgroundCollectorAt:5.

usage example(s):

ObjectMemory startBackgroundFinalizationAt:5.

o  startSchedulerAndBackgroundCollector

o  startStartBlockProcess
at the end of the smalltalk initialization, start all actions that
were delayed until the ProcessorScheduler is running in a separate process

startup and exit
o  addExitBlock: aBlock
add a block to be executed when Smalltalk finishes.
This feature is currently not used anywhere - but could be useful for
cleanup in stand alone applications.

Better use: ObjectMemory>>#addDependent: and handle the change message
#aboutToQuit.

o  addImageStartBlock: aBlock
add a blocks to be executed in a separate process after
everything has been initialized.
These blocks will be executed after an image restart.

o  addStartBlock: aBlock
to be called ONLY during very early startup (before the process scheduler
is started) to add a block to be executed in a separate process after
everything has been initialized.
Used to allow a startup script (which is executed BEFORE the scheduler and
UI display is startup up) to add actions which require those subsystems to
be operating.
These blocks will be executed only once and not be executed after an image restart.
Initial processes such as the launcher are usually started here
(see smalltalk.rc / private.rc).
ONLY to be called from such an rc file.

o  exit
finish the Smalltalk system

usage example(s):

Be careful evaluating this
     Smalltalk exit

o  exit: statusInteger
finish the Smalltalk system

usage example(s):

Be careful evaluating this
     Smalltalk exit:1

o  exitIfStandalone
if this is a standalone application, exit.
Otherwise give a warning and abort.
Call this in your code instead of Smalltalk exit,
so the code can be tested in the IDE without danger of shuttong down ST/X

o  exitIfStandalone: statusInteger
if this is a standalone application, exit.
Otherwise give a warning and abort.
Call this in your code instead of Smalltalk exit,
so the code can be tested in the IDE without danger of shuttong down ST/X

usage example(s):

     Smalltalk exitIfStandalone:1

o  exitOrError: exitCode
exit only if running as standalone application.
Raise an error in the development system.
Useful for testing standalone apps which should not kill
your development system.

usage example(s):

     self exitOrError:0

o  exitWithErrorMessage: msg

startup queries
o  commandLine
return the full command line arguments (with which ST/X was started)

usage example(s):

     Smalltalk commandLine

o  commandLineArgumentNamed: aString
extract a named argument from the command line arguments.
This searches for the given string in the command line and returns the next argument after it.

usage example(s):

     self commandLineArgumentNamed:'-display'

o  commandLineArguments
return the user command line arguments;
This is a collection of strings (separated command line words),
from which the internal startup arguments have already been removed.
I.e. if started with: 'smalltalk -I -f xxx foo bar baz',
the commandLineArguments will be #('foo' 'bar' 'baz').
In contrast, the value returned by #commandLine will be the full set of words.

o  commandName
return the excutables name - this is normally 'stx',
but can be something else for standAlone apps.

usage example(s):

     Smalltalk commandName

o  hasNoConsole
return true, if this is a console-less application (i.e. I am winstx)
i.e. there should be no writing to stdout/stderr

usage example(s):

     Smalltalk hasNoConsole

o  ignoreAssertions
return true, if assertions are to be ignored (i.e. not executed).
This is false by default in an IDE (i.e. full smalltalk),
but can be set to true for standAlone applications
(whether that is a good idea and helps, is another question)
However, it may make the app a little faster, if assertions are compatational
expensive, as they are skipped (the stc compiler is generatig code which skips those).

o  ignoreAssertions: aBoolean
set to true, if assertions are to be ignored (i.e. not executed).
This is false by default in an IDE (i.e. full smalltalk),
but can be set to true for standAlone applications
(whether that is a good idea and helps, is another question)
However, it may make the app a little faster, if assertions are compatational
expensive, as they are skipped (the stc compiler is generatig code which skips those).

o  isDebuggableApp
return true, if we want to see a Debugger, MiniDebugger or extended debugging output
in some situations.

usage example(s):

     Smalltalk isDebuggableApp

o  isHeadless
return true, if this is a headless application
i.e. no default Display connection is required/used

usage example(s):

     Smalltalk isHeadless

o  isPlugin
return true, if this is a plugin application
i.e. running in a browserWindow

usage example(s):

     Smalltalk isPlugin

o  isSTScript
return true, if this is stscript. i.e. the stx scripting engine.

usage example(s):

     Smalltalk isSTScript

o  isSharedLibraryComponent
return true, if this is a shared library component of another application
i.e. a dll within another app.

usage example(s):

     Smalltalk isSharedLibraryComponent

o  isSmalltalkDevelopmentSystem
return true, if this is a real smalltalk system
i.e. NOT a stripped or a linked standAlone application (such as the webServer)
and NOT a plugIn (i.e. running in a browser)
and NOT a sharedLibrary component (i.e. a dll in another app).
This is used to determine, whether debugging is possible/desired or not.

usage example(s):

     Smalltalk isSmalltalkDevelopmentSystem

o  isStandAloneApp
return true, if this is a standAlone application
i.e. a stripped & linked application (such as the webServer)
in contrast to a full smalltalk (development) system.

usage example(s):

     Smalltalk isStandAloneApp

o  isStandAloneDebug
return true, if this is a standAlone application which
was started with the -debug option.

usage example(s):

     Smalltalk isStandAloneDebug

o  startupArguments
return the arguments passed to StartupClass when stx gets started.
Usually these are nil,
but saving an image with a non-nil StartupClass/StartupSelector/StartupArgs allows for
a simple way to configure and create stand-alone applications

usage example(s):

     Smalltalk startupArguments

o  startupClass
return the class, that will get the start message when smalltalk
starts and its non-nil. Usually this is nil,
but saving an image with a non-nil StartupClass/StartupSelector/StartupArgs allows for
a simple way to configure and create stand-alone applications

usage example(s):

     Smalltalk startupClass

o  startupClass: aClass selector: aSymbol arguments: anArrayOrNil
set the class, selector and arguments to be performed when smalltalk
starts. Setting those before saving a snapshot, will make the saved
image come up executing your application (instead of the normal mainloop)

o  startupSelector
return the selector, that will be sent to StartupClass.
Usually this is nil,
but saving an image with a non-nil StartupClass/StartupSelector allows for
a simple way to configure and create stand-alone applications

usage example(s):

     Smalltalk startupSelector

o  wasStartedFromImage
return true, if this smalltalk was started from an image,
as opposed to a fresh and clean startup

usage example(s):

     Smalltalk wasStartedFromImage

system environment
o  language
return the language setting

usage example(s):

     Smalltalk language

o  language: aLanguageSymbol
set the language - send out change notifications

usage example(s):

     Smalltalk language:#de

o  language: aLanguageSymbol territory: aTerritorySymbol
set the language & territory - send out change notifications

usage example(s):

     Smalltalk language:#de territory:#de

o  languageAndTerritory
return the language and territory in the format lang-terr (i.e. de-de, en-us)

usage example(s):

     Smalltalk languageAndTerritory

o  languageCodeset

o  languageModifier

o  languageTerritory
return the language territory setting

o  languageTerritory: aTerritorySymbol
set the language territory - send out change notifications

usage example(s):

     Time now

     Smalltalk languageTerritory:#us.
     Time now

     Smalltalk languageTerritory:#de.
     Time now

o  setLanguage: aLanguageSymbol
set the language without change notification

o  setLanguage: aLanguageSymbol territory: aTerritorySymbol
set the language & territory - no change notification

system management
o  compressSources
compress the sources file, and remove all method source strings
from the system and replace them by refs to a string in the source file.
This is a bit different in ST/X than in other smalltalks,
since we use per-class sourcefiles for the compiled classes,
and a mix of in-memory strings and one-for-all sourceFile for
incremental compiled methods.
Therefore, only those sources which are not coming from compiled
methods are put into the 'st.src' file - all others are untouched.
This is being automated - so don't care for now.

usage example(s):

     Smalltalk compressSources

o  generateSingleSourceFile
generate the sources file, and remove all method source strings
from the system and replace them by refs to a string in the source file.
This makes the image independent from the per-class source files
and makes transportation of endUser applications easier, since
only 3 files (executable, image and sourceFile) need to be
transported.

usage example(s):

     Smalltalk generateSingleSourceFile

o  installAutoloadedClassFromSourceFile: aFilename
install aFilename (which must be a smalltalk source file) as autoloaded class
(extract the class definition chunk from the file and create an autoloaded
class stub for it)

o  installAutoloadedClassNamed: clsName category: cat package: package revision: revisionOrNil
create & install an autoload stub for a class named: clsName,
to be loaded from package.
If revisionOrNil is non-nil, set it up to load exactly that revision
(otherwise, the newest revision will be loaded

o  installAutoloadedClassNamed: clsName category: cat package: package revision: revisionOrNil numClassInstVars: numClassInstVarsOrNil
create & install an autoload stub for a class named: clsName,
to be loaded from package.
If revisionOrNil is non-nil, set it up to load exactly that revision
(otherwise, the newest revision will be loaded

o  installAutoloadedClasses
scan all packages and install all classes found there as
autoloaded. This takes some time ...

usage example(s):

     Smalltalk installAutoloadedClasses

o  installAutoloadedClassesFrom: anAbbrevFilePath
read the given abbreviation file; install all classes found there as
autoloaded. This takes some time ...

usage example(s):

     Smalltalk installAutoloadedClassesFrom:'include/abbrev.stc'
     Smalltalk installAutoloadedClassesFrom:'../../goodies/communication/abbrev.stc'

o  installAutoloadedClassesFromAbbrevFile: aFilename
self installAutoloadedClassesFromAbbrevFile:('../../goodies/communication/abbrev.stc' asFilename)

o  installAutoloadedClassesFromStream: anAbbrevFileStream
read the given abbreviation file;
install all classes found there as autoloaded, and also update the
abbreviation (className-to-fileName mapping) table.
This takes some time ...

o  loadBinaries
return true, if binaries should be loaded into the system,
false if this should be suppressed. The default is false (for now).

o  loadBinaries: aBoolean
turn on/off loading of binary objects

o  logDoits
return true if doits should go into the changes file
as well as changes - by default, this is off, since
it can blow up the changes file enormously ...

o  logDoits: aBoolean
turn on/off logging of doits in the changes file.
By default, this is off, since it can blow up the
changes file enormously ...

o  makeBytecodeMethods
walk over all methods and make each a bytecode method
iff it does not contain primitive C code.
Experimental and not yet used.

usage example(s):

     Smalltalk makeBytecodeMethods

o  recursiveInstallAutoloadedClassesFrom: aTopDirectory
scan all packages and install all classes found there as
autoloaded. This takes some time ...

usage example(s):

     Smalltalk recursiveInstallAutoloadedClassesFrom:'..\..\..\cg\private\euler'

o  recursiveInstallAutoloadedClassesFrom: aTopDirectory maxLevels: maxLevels
scan all packages and install all classes found there as
autoloaded. This takes some time ...

usage example(s):

     Smalltalk recursiveInstallAutoloadedClassesFrom:'..\..\..\cg\private\euler'

o  recursiveInstallAutoloadedClassesFrom: aDirectory rememberIn: dirsConsulted maxLevels: maxLevels noAutoload: noAutoloadIn packageTop: packageTopPath
read all abbrev.stc files from and under aDirectory
and install autoloaded classes.
If a file called NOAUTOLOAD is found, no classes there are installed as autoloaded,
but classes in subdirectories are installed, if the subdirectory contains a file
named AUTOLOAD.
If a file called NOSUBAUTOLOAD is found, no classes there and below are installed as autoloaded.
If a file called NOPACKAGES is found, no further searching is done in that directory or below.

o  recursiveInstallAutoloadedClassesFrom: aDirectory rememberIn: dirsConsulted maxLevels: maxLevels noAutoload: noAutoloadIn packageTop: packageTopPath showSplashInLevels: showSplashInLevels
read all abbrev.stc files from and under aDirectory
and install autoloaded classes.
If a file called NOAUTOLOAD is found, no classes there are installed as autoloaded,
but classes in subdirectories are installed, if the subdirectory contains a file
named AUTOLOAD.
If a file called NOSUBAUTOLOAD is found, no classes there and below are installed as autoloaded.
If a file called NOPACKAGES is found, no further searching is done in that directory or below.

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

o  saveEmergencyImage: aBoolean
set/clear the flag which controls if ST/X should save an
emergency image in case of a broken display connection.
The default is true.
This may be useful, if you work with an unsecure display
(serial line), and want to have a chance of proceeding after
a crash. In multiheaded applications, this only affects
crashes of the master Display connection (the initial connection);
errors on other displays are reported to the views and treated
like window destroy from the windowManager.

o  systemOrganization
for partial ST80 compatibility;
In ST80, Smalltalk organization returns a systemOrganizer, which
keeps track of class-categories, while all classes return a classOrganizer
from #organization, which keeps track of method categories of that class.
Since in ST/X, Smalltalk is a class, there is now a conflict.
To make a workaround possible, use #systemOrganization when porting
VW apps to ST/X to get the class-categories.
Read the documentation in SystemOrganizer for more info.

system management-fileIn
o  fileIn: aFileNameOrString
read in the named file - look for it in some standard places;
return true if ok, false if failed.
This method can load almost anything which makes sense:
.st - source files
.cls - binary smalltalk bytecode files
.so - binary compiled machine code class libraries
[.class - java bytecode -- soon to come]

usage example(s):

     Smalltalk fileIn:'source/TicTacToe.st'
     Smalltalk fileIn:'binary/TicTacToe.cls'
     Smalltalk fileIn:'binary/TicTacToe.so'
     Smalltalk fileIn:'foo.st'

o  fileIn: aFileName inPackage: aPackageID
read in the named file in a packages directory.

o  fileIn: aFileName lazy: lazy
read in the named file - look for it in some standard places;
return true if ok, false if failed.
If lazy is true, no code is generated for methods, instead stubs
are created which compile themself when first executed. This allows
for much faster fileIn (but slows down the first execution later).
Since no syntax checks are done when doing lazy fileIn, use this only for
code which is known to be syntactically correct.

usage example(s):

     Smalltalk fileIn:'source/TicTacToe.st' lazy:true

o  fileIn: aFileName lazy: lazy silent: silent
read in the named file - look for it in some standard places;
return true if ok, false if failed.
If lazy is true, no code is generated for methods, instead stubs
are created which compile themself when first executed. This allows
for much faster fileIn (but slows down the first execution later).
Since no syntax checks are done when doing lazy fileIn, use this only for
code which is known to be syntactically correct.
If silent is true, no compiler messages are output to the transcript.
Giving nil for silent/lazy will use the current settings.

o  fileIn: aFileNameOrString lazy: lazy silent: silent logged: logged
read in the named file - look for it in some standard places;
return true if ok, false if failed.
If lazy is true, no code is generated for methods, instead stubs
are created which compile themself when first executed. This allows
for much faster fileIn (but slows down the first execution later).
Since no syntax checks are done when doing lazy fileIn, use this only for
code which is known to be syntactically correct.
If silent is true, no compiler messages are output to the transcript.
Giving nil for silent/lazy will use the current settings.
This method can load almost anything which makes sense:
.st - source files
.cls - binary smalltalk bytecode files
.so - binary compiled machine code class libraries
[.class - java bytecode -- soon to come]

usage example(s):

     Smalltalk fileIn:'clients/TicTacToe/TicTacToe.st' lazy:true silent:true
     Smalltalk fileIn:'keyboard.rc'

o  fileIn: aFileName logged: logged
read in the named file - look for it in some standard places;
return true if ok, false if failed.
The argument logged controls, if the changefile is to be updated.

usage example(s):

     Smalltalk fileIn:'source/TicTacToe.st' logged:false

o  fileIn: aFileName silent: silent
read in the named file - look for it in some standard places;
return true if ok, false if failed.
If silent is true, no compiler messages are output to the transcript.

usage example(s):

     Smalltalk fileIn:'source/TicTacToe.st' silent:true

o  fileInChanges
read in the last changes file - bringing the system to the state it
had when left the last time.
WARNING: this method is rubbish: it should only read things after the
last '**snapshot**' - entry
(instead of the complete changes file).

usage example(s):

     Smalltalk fileInChanges

o  fileInClass: aClassName
find a source/object file for aClassName and -if found - load it.
search is in some standard places trying driver-file (.ld), object-file (.o) and
finally source file (.st) in that order.
The file is first searched for using the class name, then the abbreviated name.

o  fileInClass: aClassName fromObject: aFileName
read in the named object file and dynamic-link it into the system
- look for it in some standard places.
Only install the named class from this object file.
Return true if ok, false if failed.

usage example(s):

     Smalltalk fileInClass:'AbstractPath' fromObject:'../../goodies/Paths/AbstrPath.so'
     Smalltalk fileInClass:'ClockView' fromObject:'../../libwidg3/libwidg3.so'

o  fileInClass: aClassName initialize: doInit
find a source/object file for aClassName and -if found - load it.
search is in some standard places trying driver-file (.ld), object-file (.o) and
finally source file (.st) in that order.
The file is first searched for using the class name, then the abbreviated name.

o  fileInClass: aClassName initialize: doInit lazy: loadLazy
find a source/object file for aClassName and -if found - load it.
search is in some standard places trying driver-file (.ld), object-file (.o) and
finally source file (.st) in that order.
The file is first searched for using the class name, then the abbreviated name.

o  fileInClass: aClassName initialize: doInit lazy: loadLazy silent: beSilent
find a source/object file for aClassName and -if found - load it.
Search is in some standard places, trying driver-file (.ld), object-file (.so / .o) and
finally source file (.st), in that order.
The file is first searched for using the class name, then the abbreviated name.
The argument doInit controlls if the class should be sent a #initialize after the
load; loadLazy tells if it should be loaded lazily. beSilent tells if the compiler
should not send notes to the transcript; it can be true, false or nil, where
nil uses the value from SilentLoading.

o  fileInClass: aClassName package: package
find a source/object file for aClassName and -if found - load it.
search is in some standard places trying driver-file (.ld), object-file (.o) and
finally source file (.st) in that order.
The file is first searched for using the class name, then the abbreviated name.

o  fileInClass: aClassName package: package initialize: doInit lazy: loadLazy silent: beSilent
find a source/object file for aClassName and -if found - load it.
This is the workhorse for autoloading.
Search is in some standard places, trying driver-file (.ld), object-file (.so / .o) and
finally source file (.st), in that order.
The file is first searched for using the class name, then the abbreviated name.
The argument doInit controlls if the class should be sent a #initialize after the
load; loadLazy tells if it should be loaded lazily. beSilent tells if the compiler
should not send notes to the transcript; it can be true, false or nil, where
nil uses the value from SilentLoading.

o  fileInClassLibrary: aClassLibraryName
find an object file containing a binary class library in some standard places
and load it. This install all of its contained classes.
Return true if ok, false if not.
Changed to raise an error if not OK (i.e. only returns false if the error is proceeded)
Notice: the argument may not have an extension (by purpose);
the sharedLib extension (.dll / .so / .sl) is added here, to
make the caller independent of the underlying operatingSystem.

usage example(s):

     Smalltalk fileInClassLibrary:'libtable'
     Smalltalk fileInClassLibrary:'binary/libwidg3'
     Smalltalk fileInClassLibrary:'foo'

o  fileInClassLibrary: aClassLibraryName inPackage: packageID
find an object file containing a binary class library in some standard places
and load it. This installs all of its contained classes.
Return true if ok, false if not.
Notice: the argument may not have an extension (by purpose);
the sharedLib extension (.dll / .so / .sl) is added here, to
make the caller independent of the underlying operatingSystem.

usage example(s):

     Smalltalk fileInClassLibrary:'libtable'
     Smalltalk fileInClassLibrary:'binary/libwidg3'
     Smalltalk fileInClassLibrary:'refactoryBrowser' inPackage:'stx:goodies/refactoryBrowser'

o  fileInSourceFile: filenameArg lazy: loadLazy silent: beSilent
Try all available programming languages for a matching suffix

o  fileInStream: streamArg

o  fileInStream: streamArg lazy: lazy silent: silent logged: logged addPath: morePath
read sourceCode from aStream;
return true if ok, false if failed.
If lazy is true, no code is generated for methods, instead stubs
are created which compile themself when first executed. This allows
for much faster fileIn (but slows down the first execution later).
Since no syntax checks are done when doing lazy fileIn, use this only for
code which is known to be syntactically correct.
If silent is true, no compiler messages are output to the transcript.
Giving nil for silent/lazy will use the current settings.
If morePath is nonNil, it is prepended to the systemPath temporarily during the
fileIn. This allows for st-expressions to refer to more files (i.e. fileIn more)
using a relative path.

usage example(s):

     Smalltalk fileInStream:('source/TicTacToe.st' asFilename readStream) lazy:true silent:true

o  isClassLibraryLoaded: name
return true, if a particular class library is already loaded

usage example(s):

     Smalltalk isClassLibraryLoaded:'libstx_libbasic'
     Smalltalk isClassLibraryLoaded:'libstx_libwidg3'
     Smalltalk isClassLibraryLoaded:'libstx_libboss'

o  loadClassLibraryIfAbsent: name
dynamically load a classLibrary, if not already loaded
and the system supports dynamic loading.
Return true, if the library is loaded, false if not.
Changed to raise an error if not ok (i.e. only returns false if the error is proceeded)
This entry is called without system specific filename
extensions - it is portable among different architectures
as long as corresponding files (x.so / x.dll / x.sl / x.o)
are be present ...

usage example(s):

     Smalltalk loadClassLibraryIfAbsent:'libbasic'
     Smalltalk loadClassLibraryIfAbsent:'libwidg3'
     Smalltalk loadClassLibraryIfAbsent:'foo'

o  secureFileIn: aFileName
read in the named file, looking for it at standard places.
Catch various errors during fileIn.
Return true if ok, false if failed

o  silentFileIn: aFilename
same as fileIn:, but do not output 'compiled...'-messages on Transcript.
Main use is during startup.

system management-files
o  addIdeTopDirectoryToPackagePath
one above "stx"

o  addWorkspaceDirectoryToPackagePath

o  bitmapFileStreamFor: aFileName
search aFileName in some standard places;
return a readonly fileStream or nil if not found.
Searches in subdirectories named 'bitmaps' in the SystemPath.
Notice: this does not look in the package-specific bitmaps directories.

o  bitmapFromFileNamed: aFileName forClass: aClass
backward compatibility:
search aFileName in some standard places:
first in the redefinable bitmaps path,
then in the classes own package directory if existing.
Return an image or nil.

usage example(s):

     Smalltalk bitmapFromFileNamed:'SmalltalkX.xbm' forClass:View

o  bitmapFromFileNamed: aFileName inPackage: aPackage
backward compatibility:
search aFileName in some standard places:
first in the redefinable bitmaps path,
then in the package directory if existing.
Return an image or nil.

usage example(s):

     Smalltalk bitmapFromFileNamed:'SmalltalkX.xbm' inPackage:'stx:libview'
     Smalltalk bitmapFromFileNamed:'SmalltalkX.xbm' inPackage:'stx:libtool'

o  classNameForFile: aFileName
return the className which corresponds to an abbreviated fileName,
or nil if no special translation applies. The given filename arg may
include a '.st' suffix (but no other).

usage example(s):

     Smalltalk classNameForFile:'DrawObj'
     Smalltalk classNameForFile:'DrawObj.st'
     Smalltalk classNameForFile:'ArrColl.st'
     Smalltalk classNameForFile:'ArrColl.chg'

o  constructPathFor: aDirectoryName
search for aDirectory in SystemPath;
return a collection of paths which include that directory.

o  fileInFileStreamFor: aFileName
obsolete
search aFileName in some standard places;
return a readonly fileStream or nil if not found.
Searches in subdirectories named 'fileIn' in SystemPath

o  fileNameForClass: aClassOrClassName
return a actual or expected (or most wanted) filename for aClassOrClassName
- only the base name (without directory part) and without suffix.

usage example(s):

     Smalltalk fileNameForClass:#Complex
     Smalltalk fileNameForClass:'SmallInteger'
     Smalltalk fileNameForClass:'UnixOperatingSystem'
     Smalltalk fileNameForClass:'Launcher'
     Smalltalk fileNameForClass:'SomeUnknownClass'

     Smalltalk fileNameForClass:HTML::Encoder
     Smalltalk fileNameForClass:OSI::FTAMOperation
     Smalltalk fileNameForClass:'OSI::Foobar'
     Smalltalk fileNameForClass:(Workflow::UnsuccessfulFinishReasons)
     Workflow::UnsuccessfulFinishReasons classFilename

o  filenameAbbreviations
return a dictionary containing the classname-to-filename
mappings. (needed for sys5.3 users, where filenames are limited
to 14 chars)

usage example(s):

     Smalltalk filenameAbbreviations

o  findPackageDirectoryForPackage: aPackage
find a packages directory along a number of standard places

usage example(s):

     Smalltalk findPackageDirectoryForPackage:'stx:libview/resources'
     Smalltalk findPackageDirectoryForPackage:'stx:libview'

o  flushPathCaches
forget pathCaches - these are collections containing valid directory names,
where system files (resource, bitmaps etc.) are found.
A flush is only required, if a new system directory has been created while
the system is active, and those files should override the others
(for example, if you created a private resource directory)

usage example(s):

     Smalltalk flushPathCaches

o  getBinaryFileName: aFileName
obsolete
search aFileName in some standard places
(subdirectories named 'binary' in SystemPath);
return the absolute filename or nil if none is found.

o  getBitmapFileName: aFileName
for backward compatibility:
search aFileName in some standard places
(subdirectories named 'bitmaps' in SystemPath);
Return the pathName or nil if none is found.

usage example(s):

     Smalltalk getBitmapFileName:'SBrowser.xbm'

o  getBitmapFileName: aFileName forPackage: aPackageIDOrNil
for backward compatibility.
search aFileName in some standard places:
first in the redefinable bitmaps path,
then in the package directory if existing.
Return a path or nil.
Search order is:
bitmaps/<pkg>/file
resources/<pkg>/bitmaps/file
<pkg>/bitmaps/file

o  getFileInFileName: aFileName
obsolete
search aFileName in some standard places
(subdirectories named 'fileIn' in SystemPath);
return the absolute filename or nil if none is found.

o  getPackageDirectoryForPackage: aPackageID
search for a particular package; return its directory, or nil.
Stand alone applications might get nil, if there are only binaries installed.

usage example(s):

     Smalltalk getPackageDirectoryForPackage:(Array package)
     Smalltalk getPackageDirectoryForPackage:'stx:goodies/bitmaps'
     Smalltalk getPackageDirectoryForPackage:'stx:libview'

o  getPackageFileName: aFileName
search aFileName in some standard places
(packagePath and subdirectories named 'packages' in SystemPath);
return the absolute filename or nil if none is found.

usage example(s):

     Smalltalk getPackageFileName:'stx/libview/resources/normal.style'
     Smalltalk getPackageFileName:'stx/libview/styles/normal.style'
     Smalltalk getPackageFileName:'stx/libview/source.zip'

o  getPackageSourceFileName: filenameWithoutSuffixArg
search aFileName in some standard places and try all available languages

o  getResourceFileName: aFileName
search aFileName in some standard places
(subdirectories named 'resources' in SystemPath);
return the absolute filename or nil if none is found.
Obsolete: you must now provide a package argument.

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  getResourceFileName: aFileName forClass: aClassOrNil
search aFileName in some standard places
(subdirectories named 'resource' in SystemPath);
and in aClasses package directory.
Return the absolute filename or nil if none is found.

usage example(s):

     Smalltalk getResourceFileName:'de.rs' forClass:SystemBrowser

o  getResourceFileName: aFileName forPackage: aPackageIDOrNil
search aFileName in some standard places
(subdirectories named 'resource' in SystemPath);
and in a packages directory.
Return the absolute filename or nil if none is found.
Search order is:
resources/<pkg>/file
<pkg>/resources/file

usage example(s):

     Smalltalk projectDirectoryForPackage:'stx:libtool'

     Smalltalk getResourceFileName:'SystemBrowser.rs' forPackage:'stx:libtool'
     Smalltalk getResourceFileName:'normal.style' forPackage:'stx:libview'
     Smalltalk getResourceFileName:'styles/normal.style' forPackage:'stx:libview'
     Smalltalk getResourceFileName:'styles/mswindowsXP.style' forPackage:'stx:libview'
     Smalltalk getResourceFileName:'Foo.rs' forPackage:'stx:libview'

o  getSourceFileName: aFileName
search aFileName in some standard places
(subdirectories named 'source' in SystemPath);
return the absolute filename or nil if none is found.
This is used to find a sourceFile for a methods source,
if no sourceCodeManager is available.

usage example(s):

     Smalltalk getSourceFileName:'Smalltalk.st'
     Smalltalk getSourceFileName:'stx/libbasic/ArrayedCollection.st'

o  getSystemFileName: aFileNameOrString
search aFileNameOrString in some standard places;
return the absolute filename or nil if none is found.
see comment in Smalltalk>>initSystemPath.
This should be used to access resources such as bitmaps, doc-files,
and other help files.

usage example(s):

     Smalltalk getSystemFileName:'doc/online/english/TOP.html'
     Smalltalk getSystemFileName:'bitmaps/SBrowser.xbm'
     Smalltalk getSystemFileName:'bitmaps/foo'
     Smalltalk getSystemFileName:'resources/View.rs'
     Smalltalk getSystemFileName:'resources/iris.style'

o  imageFromFileNamed: aFileName forClass: aClass
search aFileName in some standard places:
first in the redefinable bitmaps path, then in the classes
own package directory if existing.
Return an image or nil.

usage example(s):

     Smalltalk imageFromFileNamed:'SmalltalkX.xbm' forClass:View

o  imageFromFileNamed: aFileName inPackage: aPackage
search aFileName in some standard places:
first in the redefinable bitmaps path,
then in the package directory if existing.
Return an image or nil.
Search order is:
bitmaps/<pkg>/file
resources/<pkg>/bitmaps/file
<pkg>/bitmaps/file

usage example(s):

     Smalltalk imageFromFileNamed:'SmalltalkX.xbm' inPackage:'stx:libview'
     Smalltalk imageFromFileNamed:'SmalltalkX.xbm' inPackage:'stx:libtool'
     Smalltalk imageFromFileNamed:'bitmaps/gifImages/garfield.gif' inPackage:'stx:goodies'
     Smalltalk imageFromFileNamed:'CheckOn10_xp.xpm' inPackage:'stx:libwidg'
     Smalltalk imageFromFileNamed:'ComboDn_xp.xpm' inPackage:'stx:libwidg'

o  libraryFileNameOfClass: aClassOrClassName
for a given class, return the name of a classLibrary which contains
binary code for it.
Read the libinfo file 'liblist.stc' (which is created during the compilation process)
for an entry for aClassOrClassName.
Search for the className in the first col, and return the value found in
the 2nd col.
Return nil if no entry is found.

A nil returns means that this class is either built-in or not present
in a package-class library (i.e. either as separate .o or separate .st file).
Otherwise, the returned name is the classLibrary object of that class.
The classes code can be loaded from that file if binary loading is supported.

usage example(s):

     Smalltalk libraryFileNameOfClass:'ClockView'
     Smalltalk libraryFileNameOfClass:'Bag'

o  packagePath
return a collection of additional directory names, where smalltalk
looks for package directories.
Notice, that directories named 'packages' under the systemPath are
always consulted - even if not in the packagePath

usage example(s):

     Smalltalk packagePath
     Smalltalk packagePath addLast:'/opt/smalltalk'
     Smalltalk packagePath addFirst:'/usr/local/otherPackages'

o  packagePath: aPath
set the packagePath;
a collection of additional directorynames, where smalltalk
looks for package directories.
Notice, that directories named 'packages' under the systemPath are
always consulted - even if not in the packagePath

usage example(s):

     Smalltalk packagePath:#( '.' '/opt/stx' '/opt/smalltalk' '/usr/local/otherPackages')

o  projectDirectoryForClass: aClass
given a class, return the path to its package directory;
nil if not found.

usage example(s):

     Smalltalk projectDirectoryForClass:Array
     Smalltalk projectDirectoryForClass:View

o  projectDirectoryForPackage: aPackage
given a packageID, return the path to its package directory;
nil if not found.

usage example(s):

     Smalltalk projectDirectoryForPackage:'stx:libbasic'
     Smalltalk projectDirectoryForPackage:'exept:smartcard'
     Smalltalk projectDirectoryForPackage:'stx'
     Smalltalk projectDirectoryForPackage:'bosch'
     Smalltalk projectDirectoryForPackage:'bosch:foo'

o  readAbbreviations
read classname to filename mappings from include/abbrev.stc.
sigh - all for those poor sys5.3 or MSDOS people with short filenames ...

usage example(s):

     Smalltalk readAbbreviations

o  readAbbreviationsFromStream: aStream
read classname to filename mappings from aStream.
sigh - all for those poor sys5.3 or MSDOS people with short filenames ...

o  realSystemPath
return the realSystemPath - that's the directory names from
SystemPath which exist and are readable

o  recursiveReadAllAbbreviationsFrom: aDirectory

o  recursiveReadAllAbbreviationsFrom: aDirectory maxLevels: maxLevels
read all abbreviations from and under aDirectory.

o  reinitializePackagePath

o  relativePackagePathForPackage: aPackage
PackageToPathMapping := Dictionary new.
PackageToPathMapping at:'expeccoNET:server' put:'expeccoNET_oldVersion/server'.
PackageToPathMapping at:'expeccoNET:server/ui' put:'expeccoNET_oldVersion/server/ui'.

Smalltalk relativePackagePathForPackage:'stx:libview/resources'
Smalltalk relativePackagePathForPackage:'stx:libview'

o  resourceDirectoryForPackage: aPackage
given a packageID, return the path to its resource directory;
nil if not found.

usage example(s):

     Smalltalk resourceDirectoryForPackage:'stx:libbasic'
     Smalltalk resourceDirectoryForPackage:'exept:expecco'
     Smalltalk resourceDirectoryForPackage:'exept:smartcard'

o  resourceFileStreamFor: aFileName
search aFileName in some standard places;
return a readonly fileStream or nil if not found.
Searches in subdirectories named 'resource' in SystemPath

o  resourceFileStreamFor: aFileName forClass: aClassOrNil
search aFileName in some standard places and in the classes
package-resource directory.
Return a readonly fileStream or nil if not found.
Searches in subdirectories named 'resource' in SystemPath

o  searchPath: aPath for: aFileName in: aDirName
search aPath for a subdirectory named aDirectory with a file
named aFileName

o  setFilename: aFileNameString forClass: aClassNameString package: aPackageNameString
overwrite old abbreviation with new one,
to allow fixing of bad abbrev files

o  sourceDirectoryNameOfClass: aClassOrClassName
for a given class, return the pathname relative to TOP of the classes source code.
Read the files 'abbrev.stc' and 'liblist.stc' (which are created during the compilation process)
for an entry for aClassOrClassName.
Search for the className in the first col, and return the value found in
the 3rd col.
Return nil if no entry is found.

usage example(s):

     Smalltalk sourceDirectoryNameOfClass:'ClockView'
     Smalltalk sourceDirectoryNameOfClass:'Bag'
     Smalltalk sourceDirectoryNameOfClass:'GLWireCubeDemoView'
     Smalltalk sourceDirectoryNameOfClass:'SomeNonExistingClass'

o  sourceFileStreamFor: aFileName
search aFileName in some standard places;
return a readonly fileStream or nil if not found.
Searches in subdirectories named 'source' in SystemPath

o  systemFileStreamFor: aFileName
search aFileName in some standard places;
return a readonly fileStream or nil if not found.
see comment in Smalltalk>>initSystemPath

o  systemPath
return a collection of directorynames, where smalltalk
looks for system files
(usually in subdirs such as resources, bitmaps, source etc.)
see comment in Smalltalk>>initSystemPath.

usage example(s):

     Smalltalk systemPath
     Smalltalk systemPath addLast:'someOtherDirectoryPath'

o  systemPath: aPath
set the collection of directorynames, where smalltalk
looks for system files
(usually in subdirs such as resources, bitmaps, source etc.)
see comment in Smalltalk>>initSystemPath.

usage example(s):

     Smalltalk systemPath
     Smalltalk systemPath:(Smalltalk systemPath copy addLast:'someOtherDirectoryPath')

o  withAbbreviationsFromStream: aStream do: aBlock
read classname to filename mappings from aStream.
Evaluate aBlock for each tuple:
class-name , abbrev-name, package
Sigh - all for those poor sys5.3 or MSDOS people with short filenames...

system management-packages
o  isPackageLoaded: aPackageIdOrPackage
Smalltalk isPackageLoaded:'stx:goodies/persistency'
Smalltalk isPackageLoaded:'stx:goodies/refactoryBrowser/lint'
Smalltalk isPackageLoaded:'stx:goodies/refactoryBrowser/lint/spelling'

o  knownLoadablePackagesDo: aBlock
enumerate loadable packages from the packages folder.

usage example(s):

     Smalltalk knownLoadablePackagesDo:[:packageID :type :path |
	 Transcript showCR:'%1 (%2) in %3' with:packageID with:type with:path.
     ]

o  loadPackage: aPackageIdOrPackage
make certain, that some particular package is loaded into the system.
Return true if loaded, false otherwise.

usage example(s):

     Smalltalk loadPackage:'stx:libbasic'
     Smalltalk loadPackage:'stx:goodies/persistency'
     Smalltalk loadPackage:'cg:cparser'
     Smalltalk loadPackage:'cg:rose'

o  packageDirectoryForPackageId: aPackageId
used by classes to find the location of their resource- and bitmap directories.

Notice that the directory structure is different between the development
environment (top for packages is ../../../stx) and delivered stand alone executables,
where the top is specified via a shell environment variable, and is typically ../lib.
At runtime, Smalltalk knows about the systemPath setting.

usage example(s):

     Smalltalk packageDirectoryForPackageId:'stx:libbasic'
     Smalltalk packageDirectoryForPackageId:'stx:goodies/persistency'
     Smalltalk packageDirectoryForPackageId:'exept:ctypes'
     Smalltalk getPackageFileName:'stx/libview'

o  requirePackage: aPackageIdOrPackage
make certain, that some particular package is loaded into the system.
Return true if loaded, false otherwise.
Just an alias which is easier to remember

o  unloadPackage: aPackageIdOrPackage
Smalltalk loadPackage:'stx:goodies/persistency'
Smalltalk unloadPackage:'stx:goodies/persistency'

system management-undeclared variables
o  clearUndeclaredVariables
remove all undeclared variables

o  undeclaredPrefix
the prefix used for undeclared variables

time-versions
o  configuration
for developers only: return the configuration, with which
this smalltalk was compiled.

usage example(s):

for developers only: return the configuration, with which
     this smalltalk was compiled.

usage example(s):

     Smalltalk configuration

o  copyrightString
return a copyright string

usage example(s):

     Smalltalk copyrightString

o  distributorString
return a string describing the distributor of this software

usage example(s):

     Smalltalk distributorString

o  expirationTime
for developers only: return the time when the system will expire.
after this time it will not run any longer.
It returns nil, if no expiration time has been set (system runs forever :-))

usage example(s):

     Smalltalk expirationTime

o  fullVersionString
return a full version string

usage example(s):

     Smalltalk fullVersionString

o  hello
return a greeting string

usage example(s):

     Smalltalk language:#us.
     Smalltalk hello

     Smalltalk language:#de.
     Smalltalk hello

     Smalltalk language:#no.
     Smalltalk hello

     Transcript showCR:(Smalltalk hello)
     Stdout showCR:(Smalltalk hello)

o  imageRestartTime
return a timestamp for the moment when this image was restarted.
If we do not execute from an image (i.e. fresh start), return nil.

usage example(s):

     Smalltalk imageStartTime
     Smalltalk imageRestartTime

o  imageSaveTime
return a timestamp for the moment when this image was saved

o  imageStartTime
return a timestamp for the moment when this system started the first time
(i.e. the first initial start without an image)

usage example(s):

     Smalltalk imageStartTime
     Smalltalk imageRestartTime

o  majorVersionNr
return the major version number.
This is only incremented for very fundamental changes,
which make old object files totally incompatible
(for example, if the layout/representation of fundamental
classes changes).

ST/X revision Naming is:
<major>.<minor>.<revision>.<release>

usage example(s):

     Smalltalk majorVersionNr

o  minorVersionNr
return the minor version number.
This is incremented for changes which make some old object
files incompatible, or the protocol changes such that some
classes need rework.

ST/X revision Naming is:
<major>.<minor>.<revision>.<release>

usage example(s):

     Smalltalk minorVersionNr

o  releaseIdentification
for developers only: return the release
(to further identify the version in case of errors)

usage example(s):

     Smalltalk releaseIdentification

o  releaseNr
return the release number.
Now releaseNr is the build number (BUILD_NUMBER from Jenkins)

ST/X revision Naming is:
<major>.<minor>.<revision>.<release>

usage example(s):

return the release number.
     Now releaseNr is the build number (BUILD_NUMBER from Jenkins)

     ST/X revision Naming is:
	...

usage example(s):

     Smalltalk releaseNr
     Smalltalk versionString

o  revisionNr
return the revision number.
Incremented for releases which fix bugs/add features
and represent a stable workable version which got published
to the outside world.

ST/X revision Naming is:
<major>.<minor>.<revision>.<release>

usage example(s):

     Smalltalk revisionNr
     Smalltalk hello string

o  timeStamp
return a string useful for timestamping a file.
The returned string is padded with spaces for a constant
length (to avoid changing a files size in fileOut with unchanged
class).

o  timeStamp: aStream
write a string useful for timestamping a file onto aStream.
ST80 compatibility

o  timeStampString
return a string useful for timestamping a file.

o  versionBuildNumber
return the executables build number - that's the jenkins build #.
Empty if not built by jenkins

usage example(s):

     Smalltalk versionBuildNumber

o  versionDate
return the executables build date - that's the date when the smalltalk
executable was built

usage example(s):

     Smalltalk versionDate

o  versionString
return the version string

usage example(s):

     Smalltalk versionString

o  vmMajorVersionNr
return the VMs major version number.

usage example(s):

     Smalltalk vmMajorVersionNr



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 19 Apr 2024 02:38:59 GMT