Re: [Pyobjc-dev] Pure Python Cocoa GUI application?
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2009-03-31 23:30:08
|
On 31 Mar, 2009, at 17:40, Greg Ewing wrote: > Orestis Markou wrote: > >> pythonw does display the dock icon (and virtualenv doesn't copy that, >> I'll raise an issue). I'm more interested in having a menubar so I >> can >> press command-Q to exit. > > I don't know what's up with that. Even using pythonw, > I've never been able to get the stock Quit menu item that > the interpreter gives you to work. In PyGUI I'm creating > all of my own menus (including the application menu) and > handling them myself. That doesn't surprise me at all. You get the Quit menu item for free, but as Python doesn't run an eventloop itself it won't notice that the menu-item is selected. That's why you have to run your own eventloop to get nice gui behaviour. > >> For some reason ctrl-c doesn't work, even when >> using the relevant AppHelper method >> (AppHelper.installMachInterrupt()). > > Control-backslash in the Terminal window seems to work > for me (I think that sends a SIGQUIT instead of a SIGINT). IIRC CTRL+C only works when your application hits Python once in a while. Ronald |