Re: [Pyobjc-dev] applicationShouldOpenUntitledFile_
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-02-02 18:09:45
|
That's weird. I just tried: - creating new project from multi-doc template - changing the YES to a NO as shown below - ran the app Untitled document showed up... b.bum On Sunday, Feb 2, 2003, at 13:00 US/Eastern, Ronald Oussoren wrote: > On Sunday, Feb 2, 2003, at 18:36 Europe/Amsterdam, bb...@ma... wrote: >> >> I was just looking into this and there appears to be a bug that was >> introduced sometime recently. The following code used to work, now >> it doesn't. I'm not sure why: >> >> # create ObjC classes as defined in MainMenu.nib >> NibClassBuilder.extractClasses("MainMenu") >> class MyAppDelegate(AutoBaseClass, NSApplicationDelegate): >> def applicationShouldOpenUntitledFile_(self, sender): >> # return NO if you don't want untitled document to be opened >> on app launch >> return NO >> > Works for me. I added this to the Todo example and if the function > returns False it doesn't open a default document and if it returns > True it does open a default document. |