Can't find that sheet override. I've searched everything. Used text search either. Here's what I've found: Basically (as I understand) this 'you have an unsaved document. Sure to quit?' sheet is displayed from the
- (void)saveDocumentWithDelegate:(id)delegate didSaveSelector:(SEL)didSaveSelector contextInfo:(void *) method. Interesting that in my document based application, this -saveDocumentWithDelegate is called *only* *after *the user selected "Yes, i'd like to save", while in TextEdit this method is invoked *before* even the sheet appears. How did they do it to behave that way? I also haven't found any mentioning of any of the elements of this dialog. Neither "Do you want to save the changes you made in the document" string is present... 2011/9/21 John Joyce <dangerwillrobinsondan...@gmail.com> > Yes TextEdit uses NSDocument, it has long been the NSDocument sample app > > On Sep 21, 2011, at 1:41 PM, Jens Alfke wrote: > > > > > On Sep 21, 2011, at 11:28 AM, Nick wrote: > > > >> do you know how did Apple developers make TextEdit display a custom > sheet for notifying that the document that's being closed needs to be saved? > It doesn't look like an ordinary default NSDocument's "Do you want to save > the changes you made in the document. Your changes will be lost if you don’t > save them." sheet. > > > > Does TextEdit use NSDocument? It didn’t use to. But maybe it does in Lion > to get all the fancy new save features. > > In any case, you can look at the source code yourself; it’s one of the > sample apps. > > > > —Jens_______________________________________________ > > > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com