TalonCommunity / Wiki

Community maintained wiki for Talon Voice
https://talon.wiki
82 stars 81 forks source link

Add note about no-op for global context action #293

Open fidgetingbits opened 4 months ago

fidgetingbits commented 4 months ago

This was something I was looking for awhile back as well, and it just came up on slack recently, so likely worth documenting:

What is the recommended way to define an action that is a no-op when in global context, but does something in a specific context? I believe Talon has some no-op checking code so that it can complain if you call an action that you forgot to implement in a given context cc/ Andreas Arvidsson

Response from Andreas

Personally I'm a fan of actions.skip(). I think the intent there is very clear both to a human reader and to Talon.