But Wait, There Is Trouble Ahead - HP B1476 68020 User Manual

Debugger/emulator
Table of Contents

Advertisement

Chapter 11: X Resources and the Graphical Interface
Instead of specifying the foreground color for the tracker quit button by using
a resource name made up of instance names as in the last example, you could
instead use a class name, as follows:
tracker.panel.control.XmPushbutton.foreground: white
Using class names in this way makes it easier to specify resources because it
relieves you from having to discover the names of particular widgets in an
application. A long string of instance names or class names is still a long
string of names, however. Fortunately, a wildcard helps to make the shortcut a
true shortcut. The wildcard is an asterisk ("*"). It can be used to replace any
number of class or instance names in a resource name. The last example could
now be shortened to either of the following:
tracker*XmPushButton.foreground: white
tracker*quit.foreground: white

But wait, there is trouble ahead

An X Window System application maintains a complete list of resources, and
the application knows the complete instance and class names for each
resource. Because you can specify resource values using shortened notation,
the application, when starting up, must match specified values to individual
resources. Some general rules apply:
As you can quickly see, resource matching favors specific resource names over
general resource names. General resource names, especially those involving
class names, can have unexpected and unintended effects. Consider the last
example again. The resource specification
334
Either a class name or instance name from the request must match each
class or instance name in the application's list of resources.
Entries prefixed by a dot are more specific and therefore have precedence
over entries prefixed by an asterisk.
Instance names are more specific and therefore have precedence over class
names.
Matching is done from left to right. Instance or class names appearing at
the beginning of the specification have precedence over those later in the
specification.

Advertisement

Table of Contents
loading

This manual is also suitable for:

B1476 68030

Table of Contents