The “Root Item”
In this section we examine the structure of an outline document, and how to create, edit, and remove its content. This overview begins with an examination of the “Root Item” of an OmniOutliner outline document.
In an OmniOutliner document, you create an outline by adding and organizing rows of data and information. As a matter of fact, the “row count” is displayed on the document summary bar at the bottom of the outline window:
However, in terms used by Omni Automation, a row is referred to as an item. For example, in the outline shown in the illustration above, Omni Automation would say that the outline is composed of seven (7) items, not seven rows. The term row is only used in Omni Automation when referring to styling properties, such as: alternateRowColor
Outline items (rows) are often referenced in terms of their relationship to other items (rows). When doing so, terms used in delineating human relationships are borrowed to describe and identify the relationships of outline items.
For example, in an outline document, every item (row) is either a child, sibling, descendent, or ancestor of another item (row). And every item has a parent, even those at the top level of the outline.
The parent of the top-level outline items is an invisible item referenced as the “Root Item” or in terms of Omni Automation, the inner-capped term: rootItem
All items (rows) in the outline are descended from the rootItem of the document.
Let’s prove the rootItem exists.
DO THIS ► | In the console window, enter the term: rootItem |
DO THIS ► | Execute the Omni Automation code by pressing the Return key. |
The console will display the result of the executed code, which is a reference to an item object, represented in the console as [object Item] meaning an instance of an object of the Item class.
What’s Next?
We will address the rootItem of the outline to create and manipulate items (rows) in the open document, in the next topic: Children