summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-04-14 20:59:13 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-04-14 20:59:13 -0400
commitcc97cfe878f2e0cb010c26c0e5cb650720b06dfb (patch)
tree7c16ab51acb0173164383983eaad0531def0eb24
parentf830bbd48213d236429201741edd6ec70e7053f9 (diff)
node: Allow children to be attached via make method.
-rw-r--r--starling/node.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/starling/node.scm b/starling/node.scm
index 4c7e56e..6461f58 100644
--- a/starling/node.scm
+++ b/starling/node.scm
@@ -182,6 +182,8 @@
(next-method)
;; Add node to global index.
(hashv-set! (nodes-by-id node) (id node) node)
+ ;; Add children.
+ (apply attach-to node (get-keyword #:children initargs '())))
(define (for-each-child proc node)
(for-each proc (children node)))