-
Notifications
You must be signed in to change notification settings - Fork 21
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
on_script_unload() and property saving bug #205
Comments
…which made properties not being saved when closing foobar. That made the initial popups on first installation to keep firing on every restart.
JSP3 has this issue too but there isn't anything that can be done (other than clarifying in the docs). Code inside the callback definitely runs because I tested writing an external text file which works. The issue here is that that fb2k itself is writing the panel configuration to theme.fth (DUI) or foo_ui_columns.dll.cfg (CUI) before we get notified that it is shutting down. Any subsequent changes made by window.SetProperty are lost in the ether. Component authors control what is written to layout files but not when. |
Yep, found the same logging to a file. The properties are properly written to the panel within the callback (GetProperty gets the updated value) but not saved to the config file. A warning should be added then to be cautious about what code is run there. |
I've added a note to my own docs... https://jscript-panel.github.io/docs/callbacks/#on_script_unload |
… when using 'Run when closing foobar?' option due to a limit on how [foobar2000/SMP work](TheQwertiest/foo_spider_monkey_panel#205). A workaround has been implemented, considering a button should always be on an specific state at init if these options were used.
on_script_unload() when foobar is closed (without errors) is behaving badly.
I have a code to save a property on script unload and it works fine on panel reload, but it doesn't work when closing foobar.
(*) Note you can not do this after panel reload, since cleaning the properties reloads the script again and adds the properties (being equivalent to 2).
The text was updated successfully, but these errors were encountered: