Abstract
Add a slot. If name is null one is auto-generated otherwise the name must be unique.
Optional
name: stringReturn a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object:
this < that => <0
this == that => 0
this > that => >0
This method may also be accessed via the <
<=
<=>
>=
and >
shortcut operators. If not overridden the default
implementation compares the toStr
representations. Also see docLang.
Examples:
3.compare(8) => -1
8.compare(3) => 1
8.compare(8) => 0
3 <=> 8 => -1 // shortcut for 3.compare(8)
Return display string for this component
Iterate children components in the tree structure
Compare this object to the specified for equality. This
method may be accessed via the == and != shortcut operators.
If not overridden the default implementation compares for
reference equality using the === operator. If this method
is overridden, then hash() must also be overridden such that
any two objects which return true for equals() must return
the same value for hash(). This method must accept null
and
return false.
Return true if this component has a slot by given name.
Check if a child component is mapped by the given name
Return a unique hashcode for this object. If a class overrides hash() then it must ensure if equals() returns true for any two objects then they have same hash code.
Return id that uniquely identifies this component within its space.
Is this is an ancestor in the tree of the given component. If the given component is this, then return true.
Is this component is a descendant in the tree of the given component. If the given component is this, then return true.
Return if this component is mounted into a component space
Gets links slot as dict of incoming component links
Return true if the component does not have a slot by given name.
Slot name under parent or "" if parent is null
Callback when a method is called. This is an observer callback only and will not determine the result value of calling a method.
Callback when a slot is modified. The newVal is null if the slot was removed.
Callback on instance itself when a slot is modified. Value is null if slot removed.
How often should this component have its onExecute callback invoked. Return null if this component has no time based computation.
Parent component or null if root/unmounted
Remove a slot by name. Do nothing is name isn't mapped.
Set a slot by name. If val is null, then this is a convenience for remove.
Xeto type for this component
Get an immutable representation of this instance or throw NotImmutableErr if this object cannot be represented as an immutable:
Return debug string
This method called whenever an it-block is applied to an
object. The default implementation calls the function with this
,
and then returns this
.
Static
echoWrite x.toStr
to standard output followed by newline. If x
is null then print "null". If no argument is provided then
print an empty line.
Optional
x: JsObj
Component or function block