I want to have cmd+w close the front most open window. any help would be appreciated.
I set up the shortcut in the main menu
CloseWindow > cmd+w
I add a menu handler to a window, this works
THIS DOES NOT WORK, it closes the about_window in #2 above
the CLOSE event/ menu handler for any window would normally only contain
using the name of a window … videowindow.close
implies that there is only ever one window of that name. (Implicit instantiation)
But for many apps, you dont use ‘the’ videowindow
You use ‘a’ videowindow, created like this:
MyWindow = new videowindow
The newly created window wont react to videowindow.close
It will close on MyWindow.close
And its close menu handle should just say self.close so it works no matter what you called it
made both windows self.close and ONLY the ‘about’ closed.
just found out by accident that cmd+. closes the ‘video’ window
what the heck, how did it get THAT functionality
I assigned both windows to use the MainMenuBar…still doesn’t work. ©?´?®?£¨¨?¨?´?´?ç?ø
I did what you said and it still does not work.
I made both windows have MainMenuBar as the Menu Bar.
Does the App have a closeWindow handler too?
Have you put breakpoints on to check the program flow?