Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gwelmarten

macrumors 6502
Original poster
Jan 17, 2011
476
0
England!
Hi
I have a Cocoa document based application that I have been building, that allows you to open seperate views and interact with a webview component. However, when ever you have interacted with it, and then go to close the application, a message comes down saying:

"Do you want to save the changes you made in the document “Untitled”?
"Your changes will be lost if you don’t save them."

I wish to make it that when my application is closed, this message is not shown. I do not need any auto-saves or saving options. How do I prevent this message been shown and disable it?

Thanks in advance for any help and support.

Sam
 
Hi
I have a Cocoa document based application that I have been building, that allows you to open seperate views and interact with a webview component. However, when ever you have interacted with it, and then go to close the application, a message comes down saying:

"Do you want to save the changes you made in the document “Untitled”?
"Your changes will be lost if you don’t save them."

I wish to make it that when my application is closed, this message is not shown. I do not need any auto-saves or saving options. How do I prevent this message been shown and disable it?

Thanks in advance for any help and support.

Sam

Code:
-(BOOL)isDocumentEdited { return NO; }
 
Hi
Thanks very much for the code. Not completely sure which file in my XCode project to put this code. Please could you tell me? I assume it would be in MyDocument.h or MyDocument.m.

Thanks in advance.
Sam
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.