[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Beginners question about program framework
We got a problem with the :command-evaluator option in the program
framework macro. Apprently the function "fonction" below does not
seem to be called. Any ideas why ? We didn't find any example in
the manual which shows how to use this option.
- thanks for any help
(defun fonction (gs co &rest args)
(ignore gs)
(read-char (dw:get-program-pane 'listener-pane))
(apply co args)
(princ "foo" (dw:get-program-pane 'listener-pane)))
(dw:define-program-framework graphic-symbol-frame
:pretty-name "Graphic Symbol System" ;pretty name
:select-key #\g ;select key
:command-definer t ;we will use the command definition macro
;(see below)
:command-table ;specifies options to cp:make-command-table
(:inherit-from '("colon full command" "standard arguments" "standard scrolling")
:kbd-accelerator-p nil)
:top-level ;our own top level function
(top-level-function) ;(in place of dw:default-command-top-level)
;(see below)
:system-menu t ;graphic-symbol appears in the system menu
;(trie-it !)
:command-evaluator
(fonction)
:panes
((title-pane
:title ;pane type
:default-character-style '(:swiss :bold-italic :very-large)
:height-in-lines 2)
(graphic-symbol-display-pane
..................
..................))))
(defmethod (top-level-function graphic-symbol-frame) ()
(in-package 'graphic-symbol)
(dw:default-command-top-level self :dispatch-mode :command-preferred))