Specifications

2 COMMUNICATING WITH THE SYSTEM SCREEN
2-7
Epoc reserved statics
The values of the Epoc reserved statics
DatProcessNamePtr
,
DatLocked
,
DatStatusNamePtr
, and
DatUsedPathNamePtr
all have special significance for Series 3 applications. The values of these variables
for different applications are read at various times by the System Screen and also by the Window Server.
An application which fails to write suitable data to these statics may find that:
an incorrect name is displayed in any status window shown in the application
instances of the application are shown in the wrong file list in the System Screen
Shutdown
or
Switchfiles
messages arrive at inopportune moments from the System Screen (see
below for more on these messages)
assigning an application button to the application in the System Screen has no effect.
In general, applications should write to these reserved statics:
on initialisation (after having analysed the contents of their command line)
whenever a new file is opened
whenever the application is about to go "busy" over an extended period of time.
There are routines in both the Hwif library and the Hwim dyl that assist with keeping these reserved
statics up to date.
While debugging using the Sibo Debugger, the values of reserved statics can be determined by using the
"Magic Statics" menu command.
DatProcessNamePtr (0x22)
This static is read by the System Screen when deciding which file lists bolded running applications should
be placed into. It is also read by the Window Server when deciding which action to take when an
application button is pressed. Finally, it is read by the System Screen in response to any "Quit
application" menu commands, to determine how to implement this request (ie how much cooperation the
System Screen might expect from the application).
The way the file lists are built in the System Screen is as follows:
for each list, the set of all eligible
files
is compiled; these will all be displayed non-bolded
then for each running application, it is decided which file list the application belongs to
this involves reading the value of
DatProcessNamePtr
for the application
further, for each running application, the
name
of the file currently open (if any) is decided
this involves reading the value of
DatUsedPathNamePtr
for the application (and possibly also the
value of
DatProcessNamePtr
)
if this name matches any entry in the file list, that entry is removed (so that it is no longer
displayed non-bolded)
the name of the open file is added to the list, in bold.
Clearly, the lists will be misleading if the running application is assigned to the wrong list.
The rules for assigning a running application to a particular file list are straightforward:
the preferred public name of the application is read from
DatProcessNamePtr
if this matches the public name of any existing file list, the application is assigned to that list
otherwise, the application is assigned to the
RunImg
list.
More on the file lists in the System Screen
Incidentally, any entry starting with
Sys$
is never displayed in any file list. Further, the name
Link
is
never displayed in the
RunImg
list. These rules prevent the display of private system processes within the
System Screen file lists.