-
Notifications
You must be signed in to change notification settings - Fork 22
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
Alert/Warning after pressing SButton #27
Comments
If this is about adding a notify/listen to SButton, then yes please! 👍 |
SButton already has notify listen capability (on the Grarak wanted to have a popup window with custom message yes/no accept/cancel bla/blubb before executing the action in the button, it's something separate. |
Okay I'll have to reread it. I wasn't sure tapping a button counted as an Apply. If I wanted to listen for a button trigger what would the to: be? I wasn't finding that part very clear. Thanks again for your time and efforts. |
I listed all events of all elements in the Wiki and when they're triggered. If you have an SButton with Or you can do it the other way round and do a notify block inside of the button, with a |
Haha perfect examples! And thank you for listening to my poop. :P |
Generally just follow the following sentences: Notifier:
Listener: Listen Well you can rephrase is several ways, but you get the gist of it. |
Just sent you a FC report from trying my SOptionList refresh as a notify in the SButton. I identified the to: for the SOptionList by its action if that helps. |
I pushed out a new version which fixes the issue. |
Confirmed fixed. Thanks! Does a refresh only refer to the current choice of a SOptionList? I was hoping it would also refresh the available values list, but that doesn't seem to be happening. |
How can it refresh something which you define at boot in a separate script? No. |
There are usage cases where the values parsed for a SOptionList could change (read from a directory, for example); allowing them to be reread by a refresh event would be a powerful extension to Synapse. I understand your reservations however. Thanks for your consideration. |
It's not possible to "refresh" something like that because values are If you'd like an API for re-setting values at run-time then that would be It's a bit far-fetched in terms of use-cases, what do you want to use it
|
It's probably a bit outside of the originally "intended" scope of Synapse, but I made kernel backup/restore functionality like Trickster and franco.Kernel updater allow. :D It uses a SOptionList (reading a file list from a directory) to let the user choose a backup then SButtons to provide actions to perform on the selected kernel image, like Delete and Restore. The only problem is when creating or deleting a backup the SOptionList can't reread the directory to update its values. I've worked around it by adding a button which removes the config.json, runs uci again and then restarts Synapse but obviously that's a huge hack and native support to refresh/rebuild SOptionList values on the fly would be more ideal, and powerful. :) There is probably a more "normal" usage case that could make use of this functionality too, but this is the one I've got in front of me. Thanks again for your time and consideration. 👍 |
I'll look into it.
|
Thanks! Also, sorry @Grarak for unintentionally hijacking your issue thread. 👍 |
You know Andrei
The text was updated successfully, but these errors were encountered: