Skip to content

talon stops responding to pops/noise after reloading the file that registers the callback #160

@rntz

Description

@rntz

Talon stops responding to pops if you cause the file that registers the callback to be reloaded, eg. by editing it. For example:

noise.py

from talon import noise

def on_pop(active):
    print("!!! POP !!!")

noise.register("pop", on_pop)

To reproduce: Make a file noise.py in the talon user directory as above. Start Talon. Verify that popping produces a line in the log. Now, edit noise.py in some irrelevant way, for example by inserting a line of white space. Now, verify that popping no longer prints a line in the log.

Note that calling noise.noise.dispatch("pop", True) from the repl will still call the callback and print a line to the log, so the problem does not appear to be that the callback is becoming unregistered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions