Action Maker programs and Divooka documents
Action Maker has no file format of its own. A program is a Divooka document (.dvk), the same kind Divooka Explore and Divooka Compute open, and the rows are another way of reading and writing the document's Routines. Open a saved program in Divooka Compute and you see the same program as nodes on a canvas; write a Routine on the canvas and Action Maker can usually read it as rows.
This page is for you if you use both.
In short
- One document, two views. Action Maker shows a document's Routines as rows. Divooka Explore and Compute show the same Routines as nodes and wires.
- No runtime of its own. Run in Action Maker runs the document on Divooka's own interpreter, exactly as the editors run a Routine, so a program behaves the same wherever it is run.
- Its actions are the distribution's. Action Maker offers the actions of the Divooka it is installed with: everything Divooka Compute has when it comes with Compute, everything Explore has when it comes with Explore, and a smaller set in the free standalone.
How a program is kept
| In Action Maker | In the Divooka document |
|---|---|
| Main | The document's entry graph: a Routine called Main |
| Another routine | A Routine of the document, beside Main; its inputs are its Begin node's outputs, its outputs its Return node's inputs |
| A routine's variables | That Routine's local variables |
| Data members | The document's data members, shared by every graph in it - including graphs Action Maker does not show |
| A row | One node, placed as a statement and wired along the execution wires in the order of the rows |
| If, a loop, Sequence, Try | Their flow control nodes; each block of rows hangs off its own output - True and False, Next, a Sequence's parts |
| A typed value | The value written on the node's input, or a small Number, Text or Truth node wired into it |
| An Operation | A node with no execution pins (a pure node) wired into the input |
| A loop's current value, an earlier row's result | A wire from that node's output |
A result's name, such as multiply1 |
The node's Name in the Properties panel, which compiled code uses too |
| A line comment | The node's label |
| A block comment | A group framing the flow control and exactly the rows it holds |
| A breakpoint | The node's breakpoint |
On the canvas, the nodes are laid out as the rows read: each row in a band of its own along its routine, the values it works out to its left and below, each block under the row that holds it.
What happens when you edit
In Action Maker. On every save and every run, Action Maker writes each Routine it shows afresh from its rows: it clears the Routine's nodes - keeping its Begin, its variables and its comments, groups and drawings - places one node per row again, and lays them out again. Everything else in the document is left exactly as it was: Functions, Events graphs, types, the title and the assets.
In Divooka Explore or Compute. It is ordinary editing. The next time Action Maker opens the document it reads each Routine from its Begin along the execution wires, one row per node.
Rows after an If
In Divooka, a Branch's two paths never meet again, and a Sequence has no "afterwards". So when you write rows after an If in Action Maker, the document says it the way Divooka does: a Sequence whose first part is the If and whose second part is the rows after it. Action Maker reads that Sequence back as the rows you wrote.
On the canvas you will see a Sequence node you never added. Leave it be: if you add a third part to it, or put more than the If in its first part, Action Maker reads it as a Sequence row instead - the same program, written differently. When you step through such a program, the run also passes the Sequence, which is no row.
Things to keep in mind
Action Maker owns the layout of the Routines it shows. Nodes you arranged by hand in a Routine are laid out again the next time Action Maker saves or runs the program. Comments, groups and drawings you added on the canvas are kept, but the nodes around them move, so a group you drew may no longer frame what it did. If a Routine's arrangement matters to you, edit it in one tool only.
Names of results are given, not kept. A Name you type for a node in Divooka Compute's Properties is replaced by the name Action Maker gives that row's result (multiply, multiply1…) the next time it writes the Routine. Inserting a row higher up renumbers the names below it.
Some things cannot be rows. Action Maker shows what it cannot express as a row marked in yellow, and then refuses to save or run the program until that row is replaced, so a document it does not understand is never overwritten with something different. This happens with:
- a Switch;
- an action this copy of Action Maker does not have - for example a document written in Divooka Compute with a package the free standalone does not carry;
- a wire from somewhere a row cannot point to, such as a value worked out inside another block.
Functions are never rows. A Function is a dataflow graph, with no order of statements to read, so Action Maker shows only the document's Routines. Functions and other graphs are kept untouched.
A calculation shared by two rows becomes two. On the canvas one pure node can feed two statements. As rows, each row has its own Operation, so after Action Maker writes the Routine there are two copies of that node. For most calculations that makes no difference. For one that should run once - a random number, something slow - put its result in a variable and read the variable in both rows.
Comments are labels, and labels are comments. A node whose label differs from its own title shows that label as the row's comment in Action Maker. A group becomes a block comment only when it frames a flow control and exactly the rows it holds; other groups stay on the canvas as they are.
Variables are matched by name and type. Renaming or retyping a local variable on the canvas reads, in Action Maker, as a different variable. Data members are safe to rename in either tool: they are changed where they are declared, and every graph that reads them follows.
Settings made on individual nodes of a Routine in Divooka Compute are not something Action Maker knows about, so check them after Action Maker has written that Routine.
The entry must be a Routine. Action Maker opens documents whose entry graph is a Routine. A document that starts with an Events graph or a Flows graph is refused with a message saying so.