summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--catbird/node.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/catbird/node.scm b/catbird/node.scm
index 998fe58..c923f94 100644
--- a/catbird/node.scm
+++ b/catbird/node.scm
@@ -65,7 +65,7 @@
(define-class <node>
(<renderable> <scriptable> <containable> <nameable> <rankable>
- <observer> <asset-container>)
+ <observer> <listener> <asset-container>)
;; An integer value that determines priority order for
;; updating/rendering.
(rank #:accessor rank #:init-value 0 #:init-keyword #:rank #:observe? #t)
@@ -182,6 +182,13 @@
(hashq-remove! (children-by-name p) (name node)))
(next-method)))
+(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.
+ (or (next-method)
+ (let ((p (parent node)))
+ (and p (apply send p message args)))))
+
(define-method (blink (node <node>) times interval)
(let loop ((i 0))
(when (< i times)