Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add guidance about disconnecting callbacks #637

Open
DragaDoncila opened this issue Mar 19, 2025 · 2 comments
Open

Add guidance about disconnecting callbacks #637

DragaDoncila opened this issue Mar 19, 2025 · 2 comments
Labels
content Ideas for new or improved content priority-high

Comments

@DragaDoncila
Copy link
Contributor

📚 New content request

We have an events reference that shows how to connect a layer or viewer event, and a guide on hooking up your own events, but none of them mention how to disconnect from that event 😅.

We should document that! Especially because I know in some cases (don't know which, don't know if they're relevant), your connect call returns a function you call to disconnect, whereas in other cases like layer events, you do my_layer.events.blah.disconnect(my_func)

Outline

I think these should be updates to existing docs linked above.

@DragaDoncila DragaDoncila added the content Ideas for new or improved content label Mar 19, 2025
@jni
Copy link
Member

jni commented Mar 20, 2025

I know in some cases (don't know which, don't know if they're relevant), your connect call returns a function you call to disconnect

how sure are you about this? (If so I would expect this is maybe a psygnal thing, but I do not remember anything like this.)

@DragaDoncila
Copy link
Contributor Author

how sure are you about this?

Not very! I just remember doing this at some stage for napari stuff but you're probably right that it's not any of our public events. I just wanted to flag it so that we actually check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Ideas for new or improved content priority-high
Projects
None yet
Development

No branches or pull requests

3 participants