Add Manipulating the object tree
authorJason Self <j@jxself.org>
Sun, 2 Jun 2019 15:20:35 +0000 (08:20 -0700)
committerJason Self <j@jxself.org>
Sun, 2 Jun 2019 15:22:05 +0000 (08:22 -0700)
informqr/informqr.md

index 4001497135bb5251e849ae38243a985bcd5f42b3..8295e07ee3fb04eba88eea131f847cdbffcebb92 100644 (file)
@@ -1,4 +1,4 @@
-% Inform in four minutes
+o% Inform in four minutes
 % Roger Firth <roger@firthworks.com>
 
 A quick reference to the Inform programming language.
@@ -236,3 +236,27 @@ array, the entries can be accessed using
 A property variable inherited from an object's class is
 addressed by *object.class::property*; this gives the
 original value prior to any changes within the object.
+
+Manipulating the object tree
+----------------------------
+
+To change object relationships at run-time:
+
+    move object to parent_object ;
+    remove object ;
+
+To return the parent of an object (or nothing):
+
+    parent(object)
+
+To return the first child of an object (or nothing):
+
+    child(object)
+
+To return the adjacent child of an object's parent (or nothing):
+
+    sibling(object)
+
+To return the number of child objects directly below an object:
+
+    children(object)
\ No newline at end of file