diff options
author | David Thompson <dthompson2@worcester.edu> | 2023-03-27 20:01:47 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-03-27 20:04:12 -0400 |
commit | d0badc7a42f4306ee28cb001fe9c3b86eff5ac60 (patch) | |
tree | 119a181167d5841687ff75c226dbb478374c1361 | |
parent | 2274835aa52d3803451060e11de296ad1dd9b51f (diff) |
node: Add clear method.
-rw-r--r-- | catbird/node.scm | 4 |
1 files changed, 4 insertions, 0 deletions
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 <node>)) + (for-each detach (children node))) + (define-method (send (node <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. |