may not only set the foreground color of the quit button on the control panel
of the application to white — it could also set the foreground colors for any
pushbutton anywhere in the application. That is because the combination of
the wildcard and the use of the class name make this resource specification
match a resource request for any pushbutton in the application.
The second of the two specifications in the example does not completely solve
the problem either. Suppose there was another button elsewhere in the
application with the instance name of "quit." (Duplicating instance names is
correct as long as the widget paths to two different widgets of the same name
are different.) The second specification of
could match a resource request for that button as well because the wildcard
allows the specification to match a number of different widget paths through
Resource specification is usually a matter of trial and error. The following
resource is probably specific enough to set just the foreground color for the
quit button on the control panel:
To view the resources in the debugger's graphical interface, you can choose
Help→X Resource Names and click on the "All names" button.
Class and instance apply to applications as well
Just as there are classes and instances of widgets, there are classes and
instances of X Window applications. Resource specifications can be
constructed in such a way that they apply to a whole class of applications, or
just to an instance of those applications.
The class name for the debugger graphical interface products is HP64_Debug.
The instance of the class that this debugger graphical interface falls under is
called debugsim. A few examples are in order.
For a given resource (called < resource> ), the following specification
applies to all debugger interface products for all processors:
Chapter 8: X Resources and the Graphical Interface