Download Atari System V - Developer`s Guide (reduced size)

Transcript
Application Development
All windows should be unmapped in their jill file. After all .fill files are loaded,
all active values attached, and all library initialization routines called, the
application should use FmShowWidget to make the first primary window
appear. The pointer to the shell widget may be obtained through an active value.
Internationalization
W1tl1in the source code, use tl1e routine FmCatGetS to obtain an
internationalized message. Mnemonics for the set number and message number
should be declared with #define directives, instead of using plain integers. 1l1c
message file (suffix .msg) should contain the mnemonic before 01e set or
message declaration to aid in decoding.
For example, if you define
#define ERRORMSGS_SET
123
#define CANNOT_OPEN 32
tl1e .msg file should contain sometl1ing like
$ ERRORMSGS_SET
The dollar sign($) is a comment sign
for messages
se t l 23
$ CANNOT_OPEN
32 Cannot
Q
open tllat file.
FmCatGetS usescatgets(3n to obtain messages. 1l1ese messages are read into
a static space, so the string retumed by FmCatGetS should be copied if it is to
be used after tl1e next call to FmCatGetS (or catgets).
Alert Popup Dialogs
Alert dialogs are used for all application errors. 1l1e only exception is when the
AlertlnitO function fails. In this case, tl1e application writes a message to the log
file and exits witll a nonzero status. The alert displayed to the user will be of a
nontechnical nature, with all technical and system call error information directed
to the log file.
Fatal alert messages should be presented with the
Interna!Error() function,
which exits after displaying the message.
Nonfatal alert messages must be presented whenever a system call or library
routine fails in a way that adversely affects the application, especially if the user
provided the information, such as a ftle name, for the routine that failed. Some
typical routines that may incur such errors are fopen() and
unlink().
Help Popup Dialogs
All applications must provide Help On Context and Help On Version. If an
application uses a mnemonic not found in tl1e OSF/Motif Style Guide, it must
also provide Help On Keys. If it binds any custom mouse actions, it must also
provide Help On Mouse. Help On Keys and Help On Mouse may be provided
even though not required by tl1e above conditions. Help On Help, Help On
Window, Index help, :mel Tutorial help may be available, but arc not required.
Running Subprocesses
The system() library routine should not be used to run processes, since it waits
for the child to exit before retuming and causes problems for tl1e XII Window
4-7