I am trying to debug a desktop app and found from customer screenshots that the MainWindow.open event does not fire when under High Sierra. I tried every useful attempt: Implicit instance on or off, making it the default window or opening it programmatically: Nothing.
I can emulate the open event if I introduce a boolean flag that I check in the Activate event, but that still will not fire the windows controls open events.
Every other window in this app looks ok, as well as the app running under Mojave or Catalina.
I just tried 2018r4 (I am on 2019r1.1 currently) but the same results.
Of course testing a demo project with a simple main window does fire the events reliably.
Anyone else encountered this phenomenon? If so, any workarounds instead of shifting the control open events to a separate method?
Does this window have a constructor ?
Does that Constructor call the supers constructor ?
I’ve seen issues like that when the call of Super.Constructor is missing
and its not a subclass of some other window which has that issue and forgets to call super.constructor ?
thats the only time I’ve run into this
Nope. Its a pure Window.
Following your advice, I added an empty parameter constructor calling super.constructor. Still no change, but thanks a lot for your assistence!
cant say I’ have ever seen an open event not get run except as I noted
Me too. And it being system-depending makes me even more confused. I mean we are talking open events I consider this rather basic and well-tested.
I guess it is some of these rare cases where removing/reinserting, renaming, resaving or similar is the solution. Some kind of hitting the tv set to fix its receiver.
if you log out of the user account and back in do things change ?
there’s definitely something weird especially since its only one windows and not all of them
I’m really fishing here but do any controls on the layout have custom constructors ?
And maybe one throws an exception and that causes the window to not initialize properly and so skips open event ?
I installed a new VM with High Sierra, so no. I had this report from a customer who runs 10.13 too.
[quote=465267:@Norman Palardy]I’m really fishing here but do any controls on the layout have custom constructors ?
And maybe one throws an exception and that causes the window to not initialize properly and so skips open event ?[/quote]
Thats a good point! I would guess if so the window should not open at all, but I have indeed a control using a VisualEffectView. Ill investigate it, thanks!
EDIT: Nothing in console, but I will investigate my color code for system compatibility. That could be a real trace, thanks again!
Do you have any declares or plugins in the application? If so, check the Console to see if an NSException is occurring. When one happens it terminates the current run loop, causes all kinds of weirdness.
It’s on my list of things to do, is to capture and handle them, because they they happen rather easily nowadays, Apple used to “Crash” the application, but now they just let it silently fail.
Just saw this, you should check which material you are using in that view, several got deprecated recently.