Skip to main content

Module demo

Module demo 

Source
Expand description

A tiny app without a window that answers the debugger methods (ui.snapshot, ui.click, …) over a real control port, deterministically: ashlar-debug demo --control <port>. It is what the tests drive, and a way to try the CLI without building an app.

- window "Demo" [ref=e1]
  - textbox "Title" [ref=e2]
  - button "Save" [ref=e3]               Save: status "Saved: <title>", enables Delete
  - checkbox "Wrap lines" [ref=e4]       toggles
  - button "Delete" [ref=e5] [disabled]  removes the last item
  - button "Load" [ref=e6]               "Loading…", then 1 s later "Loaded" and "Item 4"
  - label "Ready" [ref=e7]               the status line (id `status`)
  - list "Items" [ref=e8]
    - listitem "Item 1" [ref=e9] …

Structs§

Running
A running demo app (for tests): its port and key folder. Dropping it stops the app.

Constants§

METHODS
What the demo answers besides the standard methods.

Functions§

run
ashlar-debug demo [--control PORT]: serve until app.quit. The key goes to ASHLAR_CONTROL_KEY_DIR, or a folder of its own in the temporary folder.
start
Serve the demo on port (0 picks one) with its key in key_dir, on a thread of its own.