From d0badc7a42f4306ee28cb001fe9c3b86eff5ac60 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 27 Mar 2023 20:01:47 -0400 Subject: node: Add clear method. --- catbird/node.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/catbird/node.scm b/catbird/node.scm index 40b8673..277c611 100644 --- a/catbird/node.scm +++ b/catbird/node.scm @@ -40,6 +40,7 @@ child-ref & attach-to replace + clear blink) #:re-export (agenda detach @@ -183,6 +184,9 @@ (hashq-remove! (children-by-name p) (name node))) (next-method))) +(define-method (clear (node )) + (for-each detach (children node))) + (define-method (send (node ) message . args) ;; Move up the tree to look for a handler for the message if the ;; current node does not handle or consume the message. -- cgit v1.2.3