When I press Cmd-W (in order to close all my App’s windows) - nothing happens?
Can anyone shed any light on why this may be happening?
I have the default menubar shown on all windows, (just in case you ask).
I have the following code in the status item handler for my app - could that be the cause?
// FORCE THE Z-ORDER TO BE ON TOP OF ANY OTHER OPEN WINDOWS
Declare Function NSClassFromString Lib "Cocoa" ( inName As CFStringRef ) As Ptr
Declare Function sharedApplication Lib "Cocoa" selector "sharedApplication" ( classRef As Ptr ) As Ptr
Dim myApp As Ptr = sharedApplication( NSClassFromString( "NSApplication" ) )
Declare Sub activateIgnoringOtherApps Lib "Cocoa" selector "activateIgnoringOtherApps:" ( appRef As Ptr, flag As Boolean )
activateIgnoringOtherApps( myApp, True )
If you use a subclass of Window you can implement the menu handler there.
Or you can implement a menu handler in App for this (don’t forget to use the App.EnableMenuItems event for enabling/disabling the item).