I’m on macOS and bringing an old application up to date and converting it to API2.
I updated to Xojo2024R1.1.
The behaviour of menu option AutoEnable seems to have changed. My understanding was that it would automatically enable if there was a handler for it on the current window / object otherwise it would disable. Once enabled you could disable it again in the MeuBarSelected event.
What I’m finding is that menu items always have to be explicitly enabled / disabled, for example I have a File Page Setup option in the new version of this program and currently no handler for it anywhere, yet is is enabling. AutoEnable is set. File Save is also enabling on my frontmost window which has no edit functions and hence nothing to save. There is nothing is that window which can enable save.
I’ve been messing around with my code and found turning off AutoEnable seems to improve things a bit, especially if you have a window that doesn’t need a particular menu.
Ok, fair enough.
There are bugs and there are bugs. This one is quite nasty in that it seriously affects peoples code and could involve a great deal of reworking. Any idea when it is likely to get fixed?
I don’t think it is just swapping windows either. If you close all windows and don’t have a handler in the App object it should be automatically disabled and it isn’t.
Well it seems like you both have pre-release access and could let the rest of us know whether this has truly been fixed or not (if they’ve posted something… I don’t even know that much). The ticket is marked as fixed though.
Can anyone confirm this issue has definitely been sorted.
As far as I can tell if you explicitly disable a menu item it will remain disabled until you explicitly turn it on again. I understood for each invocation it is enabled unless you turn if off in the MenuBarSelected event.