When a document based application becomes active, and there are no open windows, a new document window is automatically created. I want to prevent this behavior and show my "Choose a Template" dialog instead of creating a blank document by default.
As you can see on the screenshot, the new document is created somewhere in NSApplicationMain
.
How can I prevent this and show my window instead?