25.6 Exporting Application Data
A value that is created or defined in an application can be used in a UIL module by declaring the value as a UIL
identifier and registering it with Mrm. In this context, the term identifier means a value that is imported from the
application, not a programmer−defined symbol. You can use an identifier as the value of a resource or as a callback
argument. Unlike other values in a UIL module, identifiers are not typed, which means that the UIL compiler cannot
perform type checking on identifiers. You should be careful to avoid type−mismatch problems in your use of
identifiers.
25.6.1 Declaring Identifiers in UIL
You can use a registered application−defined value in a UIL module by declaring it an identifier section. This
section begins with the keyword identifier and is followed by a list of declarations. Identifiers can be used like
any other values, as illustrated in the following code fragment:
identifier
home_directory;
complex_data;
procedure
open (any);
object fsb : XmFileSelectionBox {
controls {
Xm_OK {
callbacks {
XmNactivateCallback = procedure open (complex_data);
};
};
};
arguments {
XmNdirectory = home_directory;
XmNpattern = '*.uil';
};
};
In this fragment, we use the identifier complex_data as the argument to the open() callback. The identifier
represents a value of type ComplexStructure that is declared in the application program, as you will see shortly.
We declare the callback as taking an argument of type any because there is no UIL type that ...