There is essentially no type checking when you set resources in application code because of the general nature of the
Xt resource−setting API. The XtSetValues() macro takes an array of generic structures, and all of the values are
represented by the XtArgVal type. Therefore, the compiler cannot perform its usual type checking. You can get
partial type checking in C by using convenience functions, but only a few exist compared to the total number of
resources. If you set a resource to the wrong type in application code, the results are unpredictable. Nothing may
happen, but more likely the error will cause strange behavior and/or crash the application. Unfortunately, the source of
this kind of error is usually difficult to track down.
27.3.3 Resource Type Support
You can set every resource of a Motif widget from either a UIL module or application source code, while X resource
files allow you to set nearly every type. In source code, resource type support is almost inherent. As long as you
include the right header file and know the format of a resource type, you can create a value. Creating values for types
in non−Motif widget sets is no different, since you can use X, Xt, or Motif functions to create complex types.
Type support in UIL is built into the compiler; each type is specified with a unique literal syntax. Because UIL is
designed to support Motif, the built−in types are limited to the types used by the Motif widget set, and there is no way
to add a new type short of modifying the UIL ...