From: Andy T. <an...@ha...> - 2005-02-19 00:16:16
|
XXXXXXXXXXX wrote: > On Wed, 9 Feb 2005 19:25:15 +1100, Andy Todd wrote: > > >>As an aside, I had to change the event handler because >>on_menuFileExit_select doesn't seem to work on OSX. I suspect it's >>something to do with the way wxWidgets binds to the native menus. >> >>For starters the menu option appears as 'Quit' rather than 'Exit'. The >>message watcher doesn't show any events when the exit option is selected >>either. >> >>I added an 'About' menu item and the handler is invoked when this is >>selected, as expected. I noticed that I get a free 'help' menu on OSX as >>well, which I don't seem to be able to add items to with the resource file. >> >>I'm presuming this is known behaviour with wx, but would appreciate >>someone else confirming it for me. > > > Sorry Andy, were you just asking for somebody with Python 2.4 to test > this? I'm still on Python 2.3.x/PythonCard 0.81/OSX Panther and the usual: > > def on_menuFileExit_select(self, event): > self.Close() > > works fine. With the resource editor I can add a 'help' menu with an > 'about' item and it replaces the system-wide help menu. > > Neil > Indeed, it appears I had a subtle bug in my help menu, serves me right for adding it manually rather than through the resource editor. However, the FileExit_select problem is real. Try adding a line to your method above self.Close() which does something. Anything really. I tried ; print "Exiting application ..." and saw no output on the command line. Trying a variety of other things and none of them got executed. Which leads me to believe that the binding isn't quite right on Mac OSX. I still haven't been able to verify if this is a problem on other platforms but will try and have a go this weekend. Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |