Skip to Main Content
Volume 6A: Motif Programming Manual
book

Volume 6A: Motif Programming Manual

by David Brennan, Dan Heller, Paula Ferguson
September 1993
Intermediate to advanced content levelIntermediate to advanced
1014 pages
28h 26m
English
O'Reilly Media, Inc.
Content preview from Volume 6A: Motif Programming Manual
argument count at this point and issue an error message if any spurious arguments are found. The seventh argument is
the start of a NULL−terminated list of fallback resources for the top−level shell widget created by the initialization
call. Fallback resources provide a kind of "belt and suspenders" protection against the possibility that an app−defaults
file is not installed. They are ignored if the app−defaults file or any other explicit resource settings are found. When
no fallback resources are specified, the seventh argument should be NULL.
It is generally a good idea to provide fallbacks for resources that are essential to the operation of your application. An
example of how fallback resources can be used by an application is shown in the following code fragment:
String fallbacks[] = {
"Demos*background: grey",
"Demos*XmList.fontList: −*−courier−medium−r−*−−12−*",
"Demos*XmText.fontList: −*−courier−medium−r−*−−12−*",
/* list the rest of the app−defaults resources here ... */
NULL
};
...
toplevel = XtVaAppInitialize (&app, "Demos", NULL, 0,
&argc, argv, fallbacks, NULL);
...
Fallback resources protect your application against a missing app−defaults file, but they do not guard against one that
is modified incorrectly or otherwise corrupted, since they are not used if the app−defaults file is present in any form.
A better fallback mechanism would provide protection against these types of problems. Fortunately, X11 Release 5
introduces a new function, XrmCombineDatabases(), that allows ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 7A: XView Programming Manual

Volume 7A: XView Programming Manual

Dan Heller

Publisher Resources

ISBN: 9780596000431