Update of /project/mcclim/cvsroot/mcclim In directory clnet:/tmp/cvs-serv9240
Modified Files: commands.lisp Log Message: Rename the class MENU-ITEM to %MENU-ITEM, so that it doesn't clobber the MENU-ITEM presentation type.
This is important because we want menus to supersede any inner accepts in READ-FRAME-COMMAND, so the MENU-ITEM presentation type must not have applicable translators to any inner type, including EXPRESSION or FORM. (Fixes menus in the Listener)
--- /project/mcclim/cvsroot/mcclim/commands.lisp 2006/12/14 19:43:51 1.67 +++ /project/mcclim/cvsroot/mcclim/commands.lisp 2007/01/04 09:15:24 1.68 @@ -45,7 +45,7 @@
;;; According to the specification, command menu items are stored as ;;; lists. This way seems better, and I hope nothing will break. -(defclass menu-item (command-item) +(defclass %menu-item (command-item) ((menu-name :reader command-menu-item-name :initarg :menu-name) (type :initarg :type :reader command-menu-item-type) (value :initarg :value :reader command-menu-item-value) @@ -53,7 +53,7 @@ (text-style :initarg :text-style :initform nil) (keystroke :initarg :keystroke)))
-(defmethod print-object ((item menu-item) stream) +(defmethod print-object ((item %menu-item) stream) (print-unreadable-object (item stream :identity t :type t) (when (slot-boundp item 'menu-name) (format stream "~S" (command-menu-item-name item))) @@ -196,7 +196,7 @@ (when errorp (error 'command-not-present)) (progn - (when (typep item 'menu-item) + (when (typep item '%menu-item) (remove-menu-item-from-command-table table (command-menu-item-name item) :errorp nil)) @@ -352,7 +352,7 @@ (when (and (consp text-style) (eq (first text-style) 'make-text-style)) (setq text-style (apply #'make-text-style (rest text-style)))) - (apply #'make-instance 'menu-item + (apply #'make-instance '%menu-item :menu-name name :type type :value value `(,@(and documentationp `(:documentation ,documentation)) ,@(and keystrokep `(:keystroke ,keystroke)) @@ -431,7 +431,7 @@ (let ((command-table (find-command-table command-table))) (%add-keystroke-item command-table gesture - (make-instance 'menu-item + (make-instance '%menu-item :type type :value value :keystroke gesture :documentation documentation)