Outline View
Types of external representation are called views. The two primary views in Tinderbox are Outline View and Map View.
Outline View is familiar to everyone and serves as the workhorse for writing. The order of text blocks is represented by the outline’s vertical order, while topical subordination is represented by the outline’s horizontal indent.
Besides order and subordination, Tinderbox provides other means for representing information visually in Outline View: the background color of the note ($OutlineBackgroundColor
), the color of the note name ($Color
), the presence of an icon ($Badge
), and the presence or absence of a color swatch that mirrors the features of the larger notes shown in Map View ($OutlineColorSwatch
).
The swatch is quite nifty. It inherits many features of a note’s appearance in Map View—$Color, $Color2, $BorderDash, and $Pattern. The last attribute means that the swatch can blend $Color and $Color2 as a gradient or alternating lines) … or it can become a horizontal or vertical progress bar.
To do this, set $Pattern
to either bar(value,[min],[max])
or vbar(value,[min],[max])
.
With clever use of action code you can use the color spectrum to denote progress as well, making possible a bar that changes in both color and extension—providing two dimensions of information.
To accomplish the above, I first set the user attribute $myRefillGap
to the time gap between a note and either (1) its next sibling (if it exists), (2) the end date of the brewer (if it has already been terminated), or (3) the present moment:
$StartDate=$myRefill; $EndDate=$myFerment(child(original)); $Color=$Color(parent(original)); if($Created(nextSibling(original))) {$myRefillGap= minutes($myRefill,$myRefill(nextSibling(original)))} else {if($EndDate(parent(original))) {$myRefillGap=minutes($myRefill,$EndDate(parent(original)))} else {$myRefillGap= minutes($myRefill,today)} };
I then convert the gap time from minutes to days:
$myRefillGap=$myRefillGap / (60 * 24);
Color on a Mac runs from 0 to 360 “degrees.” Red is 0, orange is 30, yellow is 60, green is 120, blue is 240, violet is 270, magenta is 300, … and 360 wraps around to 0 (= red) again. My kombucha brewer is ready for tapping after 7 days, so I can make the swatch “green = ready” after 7 days by squaring $myRefillGap
and then multiplying it by 2.7 (* 2.7 49) = 132.3:
$Color2=#ff0000; $myHue=(2.7 * $myRefillGap * $myRefillGap); if($myHue > 320){$myHue=320}; $Color2.hue=$myHue; $Color2.saturation=50;