Re: NSDocument last document loading

2012-07-02 Thread Markus Spoettl
On 7/2/12 7:20 PM, Todd Heberlein wrote: I have a document-based application, and when it starts it tries to automatically load previously opened documents (running on Lion). Is there a way to disable this behavior in the program? My problem is that the document loads/analyzes data sets, and so

Re: NSDocument last document loading

2012-07-02 Thread Todd Heberlein
On Jul 2, 2012, at 2:13 PM, Kyle Sluder wrote: > Oops, I should've said "call -setRestorable:", not -setRestorationClass:. > Going with -setRestorable: is the most direct way to define your explicit > intent. Below is what I added to my Document class (which works with some interesting cavea

Re: NSDocument last document loading

2012-07-02 Thread Lee Ann Rucker
> Oops, I should've said "call -setRestorable:", not -setRestorationClass:. > Going with -setRestorable: is the most direct way to define your explicit > intent. That explains why I didn't find it; I looked for "restoration". Is there a single document that explains how all this fits together,

Re: NSDocument last document loading

2012-07-02 Thread Conrad Shultz
dow restorationClass] and return nil should work. > > - Original Message - > From: "Todd Heberlein" > To: Cocoa-dev@lists.apple.com > Sent: Monday, July 2, 2012 10:20:05 AM > Subject: NSDocument last document loading > > I have a document-based applic

Re: NSDocument last document loading

2012-07-02 Thread Kyle Sluder
On Jul 2, 2012, at 2:11 PM, Kyle Sluder wrote: > On Jul 2, 2012, at 12:52 PM, Lee Ann Rucker wrote: > >> Subclass [NSWindow restorationClass] and return nil should work. > > Rather than subclassing every NSWindow in your app, you could instead add an > override of +restoreWindowWithIdentifier:s

Re: NSDocument last document loading

2012-07-02 Thread Kyle Sluder
On Jul 2, 2012, at 12:52 PM, Lee Ann Rucker wrote: > Subclass [NSWindow restorationClass] and return nil should work. Rather than subclassing every NSWindow in your app, you could instead add an override of +restoreWindowWithIdentifier:state:completionHandler: to the subclass of NSDocumentContr

Re: NSDocument last document loading

2012-07-02 Thread Jens Alfke
On Jul 2, 2012, at 10:20 AM, Todd Heberlein wrote: > My problem is that the document loads/analyzes data sets, and some of the > very large ones can take up to 10 minutes to analyze. Sitting around waiting > 10 minutes for the app to finish starting is a pain, especially when the user > just w

Re: NSDocument last document loading

2012-07-02 Thread Alex Zavatone
Did you check the docs in Xcode for "Restoring Your Windows and Custom Objects at Launch TIme" or "User Interface Preservation" ? By any chance, do you have a restoreWindowWithIdentifier method in your window classes or is there a YES for isRestorable on the window that holds the view that woul

Re: NSDocument last document loading

2012-07-02 Thread Lee Ann Rucker
Subclass [NSWindow restorationClass] and return nil should work. - Original Message - From: "Todd Heberlein" To: Cocoa-dev@lists.apple.com Sent: Monday, July 2, 2012 10:20:05 AM Subject: NSDocument last document loading I have a document-based application, and when it starts i

NSDocument last document loading

2012-07-02 Thread Todd Heberlein
I have a document-based application, and when it starts it tries to automatically load previously opened documents (running on Lion). Is there a way to disable this behavior in the program? My problem is that the document loads/analyzes data sets, and some of the very large ones can take up to