Expand description
The check every batch an app sends passes before the UI host touches a widget.
The UI host builds every window of a workspace from what each app sends. A batch that makes it build a widget wrongly, or work without bound, takes the workspace’s windows down with it. So every message is checked, once, in the host’s own copy:
- Valid by type. A described component’s node (
ui.ListRow) names a component of the toolkit’s catalogue; each of its props is one the description declares (or a sizing argument every node takes, or the companion of a prop it declares, such asvalue:assaying which kind of textvalueholds), holding a value of the declared type; each event and binding is one it declares. A primitive of the language (stack,list) is one the host builds. - Bounded. Strings, keys, paths, props, depth and the rows of one message are limited,
and each window’s trees together hold at most
PatchLimits::nodesnodes (the host counts them as it applies patches: one window’s budget is its own). - Only its own trees. A connection is one window of one app; its patches name nodes by key paths in the trees it sent, and a path that names no node is refused when applied.
Structs§
- Patch
Limits - What one window may make its UI host hold and do.
- Refused
- Why a batch was refused: what was wrong, and where.
- Validator
- Checks batches against a toolkit’s catalogue and a window’s limits.
Constants§
- COMPONENT_
PREFIX - The prefix of a described component’s kind:
ui.ListRow. - NODE_
ARGS - The sizing and placement arguments every node takes (
fill,min: 12.rem,at), as the language’sprims::NODE_ARGSnames them. - PART
- The kind of a node holding the content of a component’s named part.
- PRIMITIVES
- Every primitive of the language a view may send: the layouts, controls and blocks the host
builds itself, and
part, a component’s named part. A primitive’s props are the language’s arguments, which the host reads by name, each as the type it takes, ignoring what it does not read; so what is checked of them is that the primitive is one the host builds and that every value is bounded.
Functions§
- fits
- Whether
valueis one of the typety, as the host reads it into a widget: text shows any value as text, a whole number is a number, anOptionholds nothing or a value. - offered_
event - The event an action offered in the prop
propfires:actions.2for the third ofactions. Its node gives it what the action runs, as it gives its declared events. - offers
- Whether
eventis one an action offered in a prop of the component fires (offered_event): the host binds such an event to the action it runs. - primitive
- Whether
kindis a primitive the host builds.