mixin

Comp

@Js
mixin Comp

Component or function block

methods parent

Parent component or null if root/unmounted

addNotNull

Add a slot if value is not null

onExecuteFreq

How often should this component have its onExecute callback invoked

reorder

Reorder the slots

remove

Remove a slot by name

spec

Xeto type for this component

dis

Return display string for this component

get

Get the given slot value or null if slot name not defined

missing

Return true if this component does not have slot with non-null value

links

Gets links slot as dict of incoming component links

has

Return true if this component has slot with non-null value

id

Return id that uniquely identifies this component within its space

trap

Get or set the slot mapped by the given name

add

Add a slot

toStr

Return debug string

set

Set a slot by name

onChange

Callback when a slot is modified on this instance

eachChild

Iterate children components in the tree structure

isMounted

Return if this component is mounted into a component space

onExecute

Callback to recompute component state

execute

Schedule an callback to onExecute on the next execution cycle

hasMethod

Return if this component has a method by given name

each

Iterate slot name/value pairs using same semantics as get

call

Call component method slot

hasChild

Check if a child component is mapped by the given name

name

Slot name under parent or "" if parent is null

eachWhile

Iterate name/value pairs until callback returns non-null

child

Lookup a child component by name

add @Operator
This add(Obj val, Str? name)

Add a slot. If name is null one is auto-generated otherwise the name must be unique.

addNotNull This addNotNull(Obj? val, Str? name)

Add a slot if value is not null. If name is null one is auto-generated.

call Obj? call(Str name, Obj? arg)

Call component method slot

child virtual Comp? child(Str name, Bool checked)

Lookup a child component by name

dis Str dis()

Return display string for this component

each Void each(|Obj,Str| f)

Iterate slot name/value pairs using same semantics as get.

eachChild Void eachChild(|Comp,Str| f)

Iterate children components in the tree structure

eachWhile Obj? eachWhile(|Obj,Str->Obj?| f)

Iterate name/value pairs until callback returns non-null

execute Void execute()

Schedule an callback to onExecute on the next execution cycle

get @Operator
Obj? get(Str name)

Get the given slot value or null if slot name not defined.

has Bool has(Str name)

Return true if this component has slot with non-null value.

hasChild Bool hasChild(Str name)

Check if a child component is mapped by the given name

hasMethod Bool hasMethod(Str name)

Return if this component has a method by given name

id Ref id()

Return id that uniquely identifies this component within its space.

isMounted Bool isMounted()

Return if this component is mounted into a component space

links Links links()

Gets links slot as dict of incoming component links

missing Bool missing(Str name)

Return true if this component does not have slot with non-null value.

name Str name()

Slot name under parent or "" if parent is null

onChange virtual Void onChange(CompChangeEvent event)

Callback when a slot is modified on this instance. The slot is non-null if name maps to a slot on the component's spec. If the operation if a remove then newVal is null.

onExecute virtual Void onExecute()

Callback to recompute component state. This is always called within a CompContext.

onExecuteFreq virtual Duration? onExecuteFreq()

How often should this component have its onExecute callback invoked. Return null if this component has no time based computation.

parent virtual Comp? parent()

Parent component or null if root/unmounted

remove This remove(Str name)

Remove a slot by name. Do nothing is name isn't mapped.

reorder This reorder(Str[] names)

Reorder the slots. The given list of names must match the existing slot names. Slots defined statically by the spec cannot be reordered and will have indetermine behavior if they are not included in the their original order (in the future this may raise an exception).

set @Operator
This set(Str name, Obj? val)

Set a slot by name. If val is null, then this is a convenience for remove.

spec Spec spec()

Xeto type for this component

toStr virtual Str toStr()

Return debug string

trap Obj? trap(Str name, Obj?[]? args)

Get or set the slot mapped by the given name.

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST