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
Have a question or need help?
Visit our GitHub Q&A discussion to get answers and subscribe to it to stay tuned.
Join our Discord channel and share your thoughts, suggestion, question etc.
Connect with our community!We welcome you to join our Discord community today.
We are trying to create the language for human beings and we do not believe it would be possible without your support. We would love to hear from you.