applications.
You can also reuse callbacks to a certain degree. While most callbacks are specific to the task at hand, it is possible to
write generic callbacks that you can use in multiple applications. Section #suilproto describes several such callbacks.
You are not limited to a single callback procedure for a callback action, so it is possible to split the behavior of a
certain action over more than one callback. For example, a typical Cancel button on a dialog might reset the dialog
contents and then pop down the dialog. These two actions can be handled by two callbacks. Other dialogs can have
their own reset callback, but can reuse the pop down callback. If you have a group of related callbacks, it may make
sense to put the callbacks into a single source code file and write one UIL include file for all of the callbacks.
27.3 Specifying Resource Values
Even though all of the UIL examples in this book specify widget resource settings directly in UIL modules, it is
important to realize that this approach is not always the best, especially for real−world applications. With any
application, you have the choice of setting resources in a UIL module, in an X resource file, or directly in application
code. This section looks at the advantages and disadvantages of setting resources in each of these places.
27.3.1 Resource Name Checking
When it comes to error checking of resource settings, UIL comes out on top. Anytime you attempt to set a built−in
resource or callback, the UIL compiler makes sure ...