Re: Stopping the new document at launch
Re: Stopping the new document at launch
- Subject: Re: Stopping the new document at launch
- From: email@hidden
- Date: Thu, 21 Feb 2002 16:50:36 -0800
This is probably an easy question to answer, but one I've had a hard
time
searching for...
How do you stop an application from automatically opening a new document
when you
1) launch it and also
2) switch to it from the doc?
See NSApplication's doc, specifically the delegate methods
applicationShouldOpenUntitledFile: and
applicationShouldHandleReopen:hasVisibleWindows:. They should do what
you need. Set up an application delegate, if you don't already have one
(I typically instantiate one in the main nib of my application, and hook
it up directly in IB to be the delegate of the File's Owner, which is
the NSApplication instance in most projects). Then just implement these
methods to do whatever you want. Good luck.
Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.