Extensions and MoneydanceUI::getUI()

Stuart Beesley (Mr Toolbox)'s Avatar

Stuart Beesley (Mr Toolbox)

12 Sep, 2024 02:46 PM

Just a note that with 2024.2(5154) (alpha) the mechanics of getUI() have been tweaked.. Previously, anything calling this method would either get the current MoneydanceUI (GUI) reference, or trigger MD to create / launch one... This was an issue for extensions as if anything called getUI() before Moneydance had properly self-launched the GUI, then the extension would trigger the GUI to load... This could occur off the EDT too (causing exceptions and random MD freezes).. An example of this would be any extension calling .getUI().getCurrentAccounts() or .getUI().getFonts() for example within its init() method....

So now, getUI() returns the UI reference or null, and Moneydance properly self-launches the GUI elsewhere itself... I understand the GUI is now launched BEFORE any extensions get initialised...

It should be noted that the GUI is also loaded first, even when using launch parameters -invoke_and_quit..

'well behaved' extensions should have no issue, this is informational... You can now safely use if (main.getUI() == null) {} if you wish..

It might be worth checking any command line launched extensions to confirm they still work OK....

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac