CLIM mail archive


Selecting Objects in Clim output menu

   Date: 29 Oct 1992 11:56:46 -0500 (EST)
   From: Ben Moreland <>

   The problem is that I cannot seem to make an object selectable
   on a CLIM menu. The program uses clim:define-application-frame
   to generate the main menu (with its own command-table). I have
   been able to have the user select from available options, then
   using popup-menus refine the appropriate action, and finally
   using clim:define presentation-method print out the results to
   a clim window (generated through clim:open-window-stream).
   (subset of code given below.) When the results have been printed,
   the user should have the option of selecting directly from one
   of formated objects (for example, if print out a contract, one of
   the items printed is the route it is scheduled on, thus I would
   like the route object to be selectable and print out that route's
   information), or return to the main menu and select a different
   (top-level action). Currently, only the latter has been achieved.
   I have used clim:define-command and clim:define-presentation-to-
   command-translator (as well as the formating function). However,
   I cannot get the items in the "result" window to be selectable.
   (I have tried using the same command table as well as different
   command tables for the main menu and output window).

I couldn't get your example to compile for a variety of reasons
(random stuff outside the comment characters, references to the
undefined PLOT package, no definitions for the presentation types used
in the code), but I'll take a shot in the dark at the problem based on
the description above.

My interpretation of what you are trying to do is pop up a separate
window, display some presentations on it and then allow the user to
click on them to invoke commands in your application.  If that is it,
you have to make sure any separate window you create shares its input
buffer with the panes of your application.  That is, your call to
open-window-stream should look like this:

(open-window-stream :parent root
		    :left left :top 
		    :width width :height height
		    :input-buffer (stream-input-buffer pane)
  . . .

where pane is one of the panes of the application frame.  You can call
frame-standard-output or get-frame-pane on the frame to get at one of
the pane objects.

Does this fix the problem?



Main Index | Thread Index