public
(Default): This ensures that the arguments can be accessed from
anywhere.private
: This ensures that the argument can only be accessed from within the
component.-- component foo:
caption name:
private boolean mouse-hovered: false
-- ftd.text: $foo.name
color: red
color if { foo.mouse-hovered }: green
$on-mouse-enter$: $ftd.set-bool($a = $foo.mouse-hovered, v = true)
$on-mouse-leave$: $ftd.set-bool($a = $foo.mouse-hovered, v = false)
-- end: foo
Here, we have defined a simple component foo
. This component is using
ftd.text
, a kernel component, as a definition which displays the
caption name
.
mouse-hovered
which can be only accessed
from within the component itself. So while component invocation, we can't access
this mouse-hovered
argument.;; This should not be done
-- foo: xyz
$mouse-hovered: false