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

[HELP] Examples to use block_signal and unblock_signal #1817

Open
Doublonmousse opened this issue Aug 4, 2024 · 0 comments
Open

[HELP] Examples to use block_signal and unblock_signal #1817

Doublonmousse opened this issue Aug 4, 2024 · 0 comments

Comments

@Doublonmousse
Copy link

The two fonctions block_signal and unblock_signal don't have examples and I can't seem to find any way to use them because of SignalHandlerId not implementing Clone.

I'd want to setup a spinbutton with a connect_value_changed signal handler and block/unblock this signal when changing the value programmatically to distinguish this from user input (and makind it easier to not have issues related to additional signals being triggered).

But adding custom methods (like a block and unblock)in my template won't work even using a RefCell from this lack of Clone.
I failed to do the "take the Signal handler id -> convert to c_ulong -> reconstruct the signal handler ID" as well. But at this point it's more of a hacky workaround than anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant