[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSDocumentController bug ?
From: |
Fred Kiefer |
Subject: |
Re: NSDocumentController bug ? |
Date: |
Tue, 18 Oct 2005 09:24:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921 |
Hi Fabien,
now I understand the difference. I was only looking at the screen and
there no panel showed up. When using strace I still don't get a
reference to the save/open panel, but I can see all the resource files
being loaded for it. So it probably gets loaded. I will look into
[NSApplication terminate:] and add a check if the application is
document based there as well. This will take some time as I need to
rebuild GNUstep from scratch after updating my Suse to 10.0.
Fred
Fabien VALLON wrote:
> On 2005-10-17 18:27:12 +0200 Fred Kiefer <fredkiefer@gmx.de> wrote:
>
>> Fabien VALLON wrote:
>>> I made a simple application with only a NSMenu and the Quit NSMenuItem.
>>> When you hit Quit, NSOpenPanel is call.
>>>
>>> from NSApplication terminate: => NSDocumentController
>>> reviewUnsavedDocumentsWithAlertTitle: cancellable: =>
>>> NSDocumentController currentDirectory ( where NSOpenPanel is
>>> instanciate )
>>>
>>
>> I tried to reproduce this behaviour with an application I build with
>> Gorm and failed. Could you please send me your minimal code, so I can
>> test with that?
>
> Sure
>
> http://www.sonappart.net/gnustep/DocTest.tar
>
> Details :
>
>
> main.m
>
> #include <AppKit/NSApplication.h>
>
> int main(int argc, const char *argv[])
> {
> return NSApplicationMain (argc, argv);
> }
>
>
> Main.gorm
> Gorm=> New Application ( You can delete the window if you want )
> => Save
>
>
> GNUmakefile
>
> include $(GNUSTEP_MAKEFILES)/common.make
>
> APP_NAME = DocTest
> DocTest_MAIN_MODEL_FILE=Main
>
> DocTest_OBJC_FILES= main.m
>
> DocTest_RESOURCE_FILES= Main.gorm
>
> include $(GNUSTEP_MAKEFILES)/application.make
>
>
> Build it ( make )
>
> strace :
>
> strace -o Output DocTest.app/DocTest
>
> ( clic on quit in the menu Item )
>
> grep tiff Output ( NSSavePanel/NSOpenPanel is call ) ( bug 1 )
>
>
> See also : grep common_retH | wc -l
> A LOT ( 19 here ) depends of your config ( bug 2 )
>
> This can be reduce in adding extention ( tiff ) in NSSavePanel ( I
> don't know if it safe )
>
> We maybye should add extention when calling NSImage imageNamed: to
> reduce access (2) ?