Handbook Glossary
factorcode.org
invoke-command ( target command -- )
Factor handbook » UI framework » Implementing new gadgets » UI gestures » Commands

Prev:command-map
Next:$command-map ( element -- )


Vocabulary
ui.commands

Inputs
targetan object
commanda command


Outputs
None

Word description
Invokes a command on the given target object.

See also
+nullary+

Definition
IN: ui.commands

GENERIC: invoke-command ( target command -- )


Methods
USING: kernel ui.commands ;

M: f invoke-command 2drop ;


USING: kernel ui.commands ui.tools.listener ;

M: listener-command invoke-command
[ command-quot ] [ nip ] 2bi call-listener ;


USING: accessors kernel ui.commands ui.operations
ui.tools.listener ;

M: listener-operation invoke-command
[ operation-quot ] [ nip command>> ] 2bi call-listener ;


USING: combinators ui.commands ui.operations ;

M: operation invoke-command operation-quot ( -- ) call-effect ;


USING: combinators ui.commands words ;

M: word invoke-command command-quot ( -- ) call-effect ;