TR: capi:list-panel & callbacks
Here is the skeleton of the code I use. Thanks. Sebastien. ;; CODE BEGIN ;; ---------- (capi:define-interface class-gui-class-viewer () ( (package-timer :accessor package-timer) ) (:panes (packages-pane capi:list-panel :accessor packages-pane :print-function #'(lambda (item) (name item)) :interaction :extended-selection :selection-callback 'cb-package-change :extend-callback 'cb-package-change :retract-callback 'cb-package-change :callback-type :interface ) ... ) (:layouts ... ) (:default-initargs :title "Class Viewer" )) (defmethod cb-package-change ((gui class-gui-class-viewer)) (mp:schedule-timer-relative-milliseconds (package-timer gui) 50)) (defmethod cb-view-package-classes ((gui class-gui-class-viewer)) (mp:process-run-function "View Package Classes" nil 'view-package-classes gui)) (defmethod view-package-classes ((gui class-gui-class-viewer)) (let* ((classes (make-hash-table :test 'equal)) (roots nil) ) ... heavy calculations are done here ... plus the graph pane update below which involved intensive cpu (capi:execute-with-interface gui #'(lambda (gui) (setf (capi:graph-pane-roots (class-graph gui)) roots) (setf (capi:collection-items (methods-pane gui)) ()) (setf (capi:display-pane-text (display-text gui)) "") ) gui) )) (defun make-applix () (let ((gui (make-instance 'class-gui-class-viewer))) (setf (package-timer gui) (mp:make-timer 'cb-view-package-classes gui)) (capi:display gui) ))