From: Jason Self Date: Sun, 2 Jun 2019 15:20:35 +0000 (-0700) Subject: Add Manipulating the object tree X-Git-Url: https://jxself.org/git/?p=inform-resources.git;a=commitdiff_plain;h=c42dba7bbd5a05f81b00d41aed1579d6a6a01801 Add Manipulating the object tree --- diff --git a/informqr/informqr.md b/informqr/informqr.md index 4001497..8295e07 100644 --- a/informqr/informqr.md +++ b/informqr/informqr.md @@ -1,4 +1,4 @@ -% Inform in four minutes +o% Inform in four minutes % Roger Firth 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