From: Jeff Sullivan
Subject: CLIM frame help...
Date: 
Message-ID: <22950@venera.isi.edu>
I'm trying to set up a menubar-like frame for a CLIM interface that
will eventually have three other application frames running at once.
This one will act like the menubar on a Mac (for lack of a better
description), and will send commands to the other frames.

This seems like such a simple thing, and it's based on code that does
work, so I have no idea why it's manifesting these two problems:

1.  When initially loaded and (RUN-MENUBAR*) is invoked, the mneubar
comes up and the three items are displayed.  However, they are not
mouse selectable (enabled?), and cannot be chosen.  (However,
CLIM:COMMAND-ENABLED-P is true for them.)

2.  The second and subsequent times I run (RUN-MENUBAR*), the text of
the menu items is no longer visible.  I ahve to reload the entire file
to get them visible again.

I wonder if the two problems are related, but have no idea how.

If anyone can help me with this, I'd be much obliged.

Thanks in advance,

jas


This is the stripped-down sample code:

;;; File starts here

(in-package "TEST")

(setq *ees-root* (clim:open-root-window :CLX))

(defvar *Menubar-frame* nil)

;;;
;;  Application initialization functions
;



(defun RUN-MENUBAR* (&optional reset)
  "Runs the menubar frame in the forground process."
  ;; Kill the menubar process if it's running
  (if *Menubar-process*
      (lcl::kill-process *Menubar-process*))
  ;; Create a new menubar frame
  (setq *MENUBAR-frame* (clim:make-application-frame
			 'MENUBAR
			 :parent *EES-ROOT*
			 :left 0 :top 0
			 :height 20))
  ;;
  (clim:run-frame-top-level *Menubar-frame*))

;;;
;;  The Menubar application frame
;

(clim:define-application-frame MENUBAR ()
  ()
  (:panes ((menu :command-menu
		 :stream-background clim::+light-slate-gray+
		 :stream-foreground clim::+ivory+)))
  (:layout ((main (:column 1
			   (menu :rest)
			   )))))

;;;
;;  Commands for the Menubar application
;

(define-Menubar-command (com-coa-map-menu
			 :menu t
			 :name "Map")
    ()
  ;;
  ())

(define-Menubar-command (com-coa-summary-menu
			 :menu t
			 :name "Summary")
    ()
  ;;
  ())

(define-Menubar-command (com-menubar-quit
			 :menu t
			 :name "Quit")
    ()
  ;;
  (clim:frame-exit *menubar-frame*))

--
--------------------------------------------------------------------------
Jeffrey A. Sullivan             | Research Scientist et al.
ยทยทยท@isi.edu (Internet)          | Information Sciences Institute
72511,402    (Compuserve)       | University of Southern California