CLIM mail archive

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

deactivating sub-menu items



In CLIM 2.0.beta2.0 on Allegro 4.2.beta2.0 [SPARC; R1] (7/6/93 14:26), ...

I see how to deactivate a command in a pull-down menu using COMMAND-ENABLED.
What I need to do is dynamically deactivate a sub-menu in the same manner.  In
the example below, I'd like to be able to specify whether the "Selected
Filecards" menu item in the second command-table is active depending on the
result of evaluating the form (selections frame), as would be done in the
fictitious method COMMAND-TABLE-ENABLED.

(define-command-table FOCUS-FRAME-REPORTS-MENU
    :menu (("Checks" :command  (COMMAND-STUB))
	   ("Filecards" :menu focus-frame-filecard-report-menu)))

(define-command-table FOCUS-FRAME-FILECARD-REPORT-MENU
    :menu (("All Filecards" :command (com-focus-frame-print-all-filecards))
	   ("Leaf Filecards" :command (com-focus-frame-print-leaf-filecards))
	   ("Selected Filecards" :menu focus-frame-selected-filecard-report-menu)))

(define-command-table FOCUS-FRAME-SELECTED-FILECARD-REPORT-MENU
    :menu (("Assemblies Only" :command (com-focus-frame-print-selected-filecards))
	   ("Include Components" :command (com-focus-frame-print-subset-filecards)))) 


(defmethod COMMAND-TABLE-ENABLED ((commamnd-table-name
                                   (eql 'focus-frame-selected-filecard-report-menu))
			          (frame focus-frame))
  (selections frame))



Follow-Ups:

Main Index | Thread Index