client_data_tile function assigns application-specific data to a tile. The data is available at callback time as the $data variable and must be a string. Client data is not represented in DCL; it is valid only while your application is running. Using client data is comparable to using user-defined attributes. The main difference is that user-defined attributes are read-only, while client data can change at runtime. Also, end-users can inspect user-defined attributes in the application's DCL file, but client data is invisible to them.The
MK_LIST function (shown in ) makes the list an argument:Because your program must maintain the list displayed by a list box (or pop-up list), client data is good for handling this information. The following modification to the
(defun MK_LIST (readlist displist / )
client_data_tile, and then pass that list to MK_LIST by means of an action expression as follows:This code eliminates the need for a global list variable. The following calls in the main part of the dialog box handler associate a short list with the tile by calling
"Red-Green-Blue Cyan-Magenta-Yellow Hue-Saturation-Value"
"(setq usrchoice (mk_list $value $data))"