A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.lispworks.com/documentation/lw61/IDE-W/html/ide-w-436.htm below:

20.6.3 Callbacks for menu items

20.6.3 Callbacks for menu items All Manuals

>

LispWorks IDE User Guide

>

20 Example: Using The Interface Builder

>

20.6 Defining the callbacks 20.6.3 Callbacks for menu items

Both menu items in the interface need a callback function. As with other callback functions, these are specified by defining a general callback, display-pane-selection , which displays, in a dialog, the current selection of any pane.

(defun display-pane-selection (reader data interface)
  (declare (ignore data))
  (capi:display-message "~S: ~S selected"
                        (capi:capi-object-name 
                         (funcall reader interface)) 
                        (capi:choice-selected-items 
                         (funcall reader interface))))

The following two functions call display-pane-selection , passing the reader of a pane as an argument. These functions are specified as the callbacks for the two menu items.

(defun display-graph-selection (&rest args)
  (apply 'display-pane-selection 'graph-reader args))
(defun display-list-selection (&rest args)
  (apply 'display-pane-selection 'list-reader args))

As with the other callback functions, specifying the callbacks in this way allows for easy extension of the example.

LispWorks IDE User Guide (Windows version) - 25 Nov 2011


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4