[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Menu Keystrokes Disappear



Here is a better example of the disappearing keystokes.
Starting in a new copy of MCL 2.0x run


(progn
  (defvar *original-menubar* nil) 
  (setf *original-menubar* CCL::*OLD-MENUBAR*)
  (SET-MENUBAR *original-menubar*)
  )

;; Now that the new menubar is installed, a check shows that 
;; the keystroke shortcuts are stilkl intact 

(progn 
  (defvar *LISP-Menu* (MAKE-INSTANCE 'MENU
                        :MENU-TITLE "LISP"
                        :MENU-COLORS `(:MENU-TITLE 12553495
:MENU-BACKGROUND ,*white-color*)
                        ))        
  (defvar *Eval-Bar* (fourth *original-menubar*))
  (defvar *Tool-Bar* (fifth  *original-menubar*))
  
  )

(progn
  (apply 'remove-MENU-ITEMS  *LISP-Menu* (MENU-ITEMS *LISP-Menu*))
  
  (apply 'add-MENU-items *LISP-Menu* (menu-items *Eval-Bar*))
  (add-MENU-items *LISP-Menu* (MAKE-INSTANCE 'MENU-ITEM
:MENU-ITEM-TITLE "-" :DISABLED T))
  (apply 'add-MENU-items *LISP-Menu* (menu-items *Tool-Bar*))
  
  *LISP-Menu*
  )

;; They are still there in the installed menu, however

(SET-MENUBAR *original-menubar*)

;; and the keystokes disappear, and are no-longer functional.
;; A little experimentatiuon shows that this takes place in
add-MENU-ITEMS

;; My question is, why does 'add-MENU-ITEMS take them away?

The *lisp-Menu* can now be installed in a menubar and the keystokes 
are carried along with the new menu items.  Both menubars work
normally except for the keystoke shortcuts.

This is probably part os some Apple guideline, or is it a bug?
Thanks.
WWS