Skip to content

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

Open

Description

@fidgetingbits

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions