Basics, Part 3: Connections and attributes

Attributes

Each expression has a set of attributes, which is a list of key-value pairs. By default, each expressions set of attributes is empty.

To use one expression as an expression for another, you must connect the attribute to its target with an arrow. Do so as follows.

  1. Place your cursor in the expression that will become an attribute.
  2. Click the connections button on the toolbar (with the ↗ icon).
  3. Click to place your cursor in the target expression.

See the examples below.

A connection has been created for you here:

From this source to this target.

Place your cursor in either expression to see the connection.

Now try it yourself. Form a connection here:

Make this the source, and make this the target.

Keys

In the examples above, all the attributes have the word "label" on their arrows. That is the key for the attribute, and the source expression is the attribute's value. So for example, the "target" expression has an attribute with key "label" and value "source."

You can change this in a few ways.

Try each of these methods in the example Lurch document above.

Attributes summary

You can hide an attribute inside the expression it modifies. Right-click the attribute and choose "Hide this attribute."

To reveal an attribute, right-click the expression into which it was hidden, and choose "Attributes..." A dialog will appear listing all attributes of the expression, both hidden and visible. You can hide/show them, edit the keys, edit the values of any atomic attribute values, delete attributes, and add new ones from that dialog.

Here is an example of a single target with many attributes attached to it. Right-click the target and ask to see its attributes summary. (Notice the one hidden attribute!)

Target expression:

  • Abraham LincolnWhig

Some attributes attached to it:

  • male
  • lawyer
  • state representative
  • president