is made, similarly to how it is made on Nibbles script, which instead uses a non-modal prompt (show_custom_dialog).
it doesn’t seem to work in the modal case: the code inside the notifier does not get executed, but the notifier is correctly removed and has_notifier correctly returns true.
by quickly trying using a non-modal dialog, it does seem to work; I didn’t test it thoroughly because it starts giving me lots of unrelated errors, but it the same mechanism is proved to work with Nibbles, as said above
yes, I also think the problem is that, as the first thing the notifier function does is to check if the dialog is closed; in such case, the notifier gets removed and its code is terminated, so the execution flow is like this:
add notifier
the notifier does nothing until the dialog is opened
open dialog, but the notifier code is never executed because the dialog is modal
close dialog
the notifier code is executed, but it is immediately removed because now the dialog is closed
Yes, modal dialogs do block all other events for all other dialogs and the main window. renoise.tool().app_idle_observable is part of the main window.
Why do you need idle loops at all in this case? If you want to do some “polling” in your modal dialog, we should think about adding "window_idle_observable"s to the modal windows instead.
Not really related to this problem in general, but the slicer anyway does not need to be modal. All you need to check is if the current sample buffer is valid, a sample is present, which should be quite easy to handle?