[Pythonmac-SIG] [May be OT] A question about creating a nib (cocoa specific)

Ronald Oussoren ronaldoussoren at mac.com
Wed Jan 5 12:46:12 CET 2005


On 5-jan-05, at 11:33, whamoo wrote:

> Hello,
>
> When I create application with cocoa and python, also using the 
> tutorial on the pyobjc site, when i it cmd-w or click on the reb x 
> button my application disappear but don't quit, the most of macosx 
> application like itunes, ical, ecc... when you click on the dock icon 
> redisplay the graphics interface, my app doesn't...

That's a generic Cocoa question.

To close the application when your main window is closed you should 
implement a windowWillClose_ method that exists the application.

If you implement a document-based application the application will 
automaticly open a new window when no windows are open and you click on 
the dock icon for the application. There is probably a callback that 
will be called when someone clicks on the document icon (probably a 
delegate method for NSApplication).

Ronald



More information about the Pythonmac-SIG mailing list