I’m pretty sure it’s not a bug. My guess would be that since the application doesn’t lose focus to another application when it quits, it simply quits, the deactivate event is never fired.
Since I need the symmetry Open/Close and Activate/Deactivate I’m going to subclass Application and raise Deactivate before raising Close in the subclass’s Close event.
[quote=55592:@Eli Ott]Didn’t think of that - makes sense.
Since I need the symmetry Open/Close and Activate/Deactivate I’m going to subclass Application and raise Deactivate before raising Close in the subclass’s Close event.[/quote]
Just put all your code of the Activate and Deactivate events in methods and call them when you need it.
[quote=298497:@Joost Rongen]On Windows, even Window1.close doesn’t fire the deactivate event, while the activate event fires correctly.
(FB 1569 , 2008)[/quote]
do you have App.AutoQuit=true ?
I have. But the issue I mend was about opening and closing windows within the app. Deactivate just should fire as a result of Window.close according to my opinion, Activate does on Window.open.
I disagree. The window is not deactivating, it is closing. Activate fires with Window.Open because the window is being called to the front, Activated. If there was a way to open a window behind the others and not bring it to the front, I would expect Open to fire but not Activate.