15.6 Defining the callbacks

15.6.2 Callbacks to display data in a dialog

As withupdate-selection, one main function serves to display the data from any action in a dialog.

(defun display-in-dialog (type data interface)
   "~S: ~A ~S"
   (capi:interface-title interface) type data))

The functiondisplay-selection-in-dialog is the action callback for both the graph pane and the list panel. It callsdisplay-in-dialog, specifying one of the required arguments.

(defun display-selection-in-dialog (&rest args)
  (apply 'display-in-dialog "selected" args))

Note: Although only one action callback is specified in the example interface, the relevant functions have been defined in this modular way to allow for the possibility of extending the interface. For instance, you may decide at a later date that you want to display the information for an extended selection in a dialog, rather than in the display pane. You could do this by defining a new callback which callsdisplay-in-dialog, passing it an appropriate argument.

Common LispWorks User Guide, Liquid Common Lisp Version 5.0 - 18 OCT 1996

Generated with Harlequin WebMaker