Re: [Pyobjc-dev] applicationShouldOpenUntitledFile_
Brought to you by:
ronaldoussoren
From: Etienne P. <ep...@ep...> - 2003-02-02 17:26:53
|
On Sunday, Feb 2, 2003, at 08:22 Europe/Amsterdam, Mitch Chapman wrote: > On Saturday, February 1, 2003, at 11:00 PM, bb...@ma... wrote: >> Very easy fix and not at all obvious. The problem is that there is >> no way for the bridge to know that your implementation of the method >> should return BOOL. So, you either have to tell the bridge that your >> method returns a BOOL through the use of the objc.selector() function >> or, better yet, declare that your class implements the informal >> NSApplication delegate protocol. > Hm... I think the project template already did this for me. > (BTW thanks for including the project templates -- way cool.) > Here's the relevant code, showing the class declaration provided by > the template: > The log message is showing up in the PB Run window, right about the > time the unwanted Untitled document appears. In trying to make a delegate for a window responding to windowShouldClose, I can also not get it to NOT close the window even if I have only one statement in the method: return NO Could this be related to the above behaviour? EP |