define-command ( word hash -- )
Factor handbook » UI framework » Implementing new gadgets » UI gestures » Commands

Next:define-command-map ( class group blurb pairs -- )


Vocabulary
ui.commands

Inputs
worda word
hasha hashtable


Outputs
None

Word description
Defines a command. The hashtable can contain the following keys:
+nullary+ - if set to a true value, the word must have stack effect ( -- ); otherwise it must have stack effect ( target -- )
+listener+ - if set to a true value, the command will run in the listener
+description+ - can be set to a string description of the command


Definition