Many thanks. Yes, that test did work – the applet hides normally.
There are quite a lot of things in my applet which are different and could be involved:
- I use Script Debugger, not Script Editor.
- The applet is quite large with over 6,000 lines of code in 4 script files, a separate Service and 3 executables.
- The applet has windows which are created with the Dialog Toolkit Plus script library from Shane Stanley, modified by me. [Sorry can't provide a link - this Forum rejects the URL]
- All the applet windows are modal (due to design of the Dialog Toolkit).
Nonetheless, the main app window has been hiding normally since late 2018. I don't understand why the behaviour would change now. My only guess is that something changed in macOS recently that disclosed a flaw in my applet. Evidence for that is that versions of my applet (e.g. January 2022), which previously behaved normally, do not hide reliably in macOS 13.0.1. There was no such problem in macOS 12.
Maybe I have some deprecated code which has become problematic. For example, in the Script Library, I am using a property "NSLeftTextAlignment" instead of "NSTextAlignmentLeft". I stayed with the old form because the new form crashed my applet no matter what I tried.
Maybe the problem is the main window being modal. But why would that not be an issue before now ?
Anyway, the applet still works which I think is quite something.