Re: Calling specific method
"Erik Ronström (as erik dot ronstrom at doremir dot com)" <[email protected]> Sat, 18 Apr 2026 10:47:57 +0200
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
Oh, that's a nice approach! Thanks a lot! Erik > On 17 Apr 2026, at 18:12, Tim Bradshaw (as tfb at cley dot com) <[email protected]> wrote: > If you (rather than the system) are calling MPDC then it's likely better to write your own, in terms of a GF called, say, walk-pane-p which will normally return t but will have a method returning nil for your pane. You can use map-pane-children to do each level. This is an attempt at that. Caveat emptor (defgeneric walk-pane-p (pane) ;; Define a method on this for a class you don't want to walk (:method (pane) (declare (ignorable pane)) t)) (defun mpdc (pane f &key visible test reverse leaf-only) (let ((pane-leaf t)) (when (walk-pane-p pane) (map-pane-children pane (lambda (c) (setf pane-leaf nil) (mpdc c f :visible visible :test test :reverse reverse :leaf-only leaf-only)) :reverse reverse)) (when (and (or (not test) (funcall test pane)) (or (not visible) (interface-visible-p pane)) (or (not leaf-only) pane-leaf)) (funcall f pane))) _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html