[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window manager interaction

From: Wolfgang Lux
Subject: Re: Window manager interaction
Date: Sun, 18 Oct 2009 14:44:24 +0200

Richard Frith-Macdonald wrote:

On 17 Oct 2009, at 18:13, Wolfgang Lux wrote:

I agree that with MS Windows style menus an application should terminate when its last window is closed and have just committed code that implements that logic.

That sounds right to me.

With regard to creating a new document upon program startup, I think that a document based application should always do so (regardless of the interface style) and have committed code for that too.

I'm less sure about that ... one thing I really hate is applications which open up blank document windows when I don't want them (which is almost always the case).

I happen to think differently. Most of the time I find it annoying that I have to go to the menu just to create a new document after starting an application. However, that is probably because I usually start an application directly only when I want it to create a fresh document and otherwise I start the application by double-clicking the document I want to open. So I understand that your workflow is probably different from mine.

You are probably right about it though ... it does seem a very common behavior on OSX (though some apps open the most recently used document, and few don't open anything). Is it actually automatic though ... if so, it might be nice to have a default to disable it.

What I've implemented is in fact just the OS X behavior: In a document-based application, create a new document on startup unless the user did already request another document to be opened (or there are autosaved changes that were not properly cleaned up when the program was used last time, probably indicating that there was a crash). The OS X way to prevent a document-based application from opening a fresh document on startup is by implementing the - applicationShouldOpenUntitledDocumentFile: and return NO from it. Anyway, if you think it would be useful to have a user default too, I'll add it (or you can do it yourself; look for the code which calls -openUntitledDocumentAndDisplay:error: the end of -finishLaunching in NSApplication.m).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]