The Inspector API models an Inspector as a group of trees. Each tree has a root, which corresponds to a Scope in the VariablesView. Each tree is componsed of Nodes, one of which is the root. A tree is a UI element.
A tree is similar to, but distinct from, the object under inspection which it represents. Programmers can traverse trees using the parent and children properties of Nodes. The values of these properties represent what is shown in the UI, not necessarily what is true about the object under inspection. All information about the object under inspection must be retrived via ansynchronous object clients, which are bound to Nodes when the Nodes are created.
Communication between an Inspector tree UI and the object under inspection happens via two methods:
Inspector.onEdit: fires when a(key, value)pair changes in the UI, and causes changes to the object under inspection.Inspector.addChild: is set from the object under inspection as part of populating the tree