aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-30 15:29:20 +0100
committereunhhu <[email protected]>2026-09-30 15:29:20 +0100
commit72ecae6b6eb1365e722bd6d45acae8a5ccb74b23 (patch)
tree3b49bc61da3cee795afdc335bbb149b7df86649e /examples
parent8fc6f35b30642f3a8ebbd7f5f47b70195c8ffea1 (diff)
downloadvega-72ecae6b6eb1365e722bd6d45acae8a5ccb74b23.tar.gz
vega-72ecae6b6eb1365e722bd6d45acae8a5ccb74b23.zip
Show a bool as true or false, and make the examples' flags bools
aup and Pure now have a bool (Pure 016): a view or column may be one. vega_text writes it as true or false, as a string's interpolation does, so every surface shows the same words: the CLI, the TUI's cells, speech and the web surface's JSON (a value's text) and page. An app that wants other words picks them with a conditional (if t.done { "done" } else { "" }). The flags of the examples are bools: todo's done and urgent, today's done, the stopwatch's running. vega.when takes the bool as it took the number. bools checks a bool field and a bool column on the CLI, the TUI, speech and the web surface: true and false, never 1 and 0.
Diffstat (limited to 'examples')
-rw-r--r--examples/stopwatch.aup2
-rw-r--r--examples/today.aup2
-rw-r--r--examples/todo.aup4
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/stopwatch.aup b/examples/stopwatch.aup
index cd075b0..d5408a0 100644
--- a/examples/stopwatch.aup
+++ b/examples/stopwatch.aup
@@ -6,7 +6,7 @@ record Lap {
at = 0
}
-state running = 0
+state running = false
state started = 0
state elapsed = 0
state laps: list of Lap
diff --git a/examples/today.aup b/examples/today.aup
index e5db53b..65e533f 100644
--- a/examples/today.aup
+++ b/examples/today.aup
@@ -5,7 +5,7 @@ use vega
record Task {
title: text
- done = 0
+ done = false
}
state tasks: list of Task
diff --git a/examples/todo.aup b/examples/todo.aup
index f1e3825..57c6954 100644
--- a/examples/todo.aup
+++ b/examples/todo.aup
@@ -4,8 +4,8 @@ use vega
record Task {
title: text
- done = 0
- urgent = 0
+ done = false
+ urgent = false
}
state tasks: list of Task