Document dirty?
Document dirty?
- Subject: Document dirty?
- From: email@hidden
- Date: Tue, 8 Oct 2002 18:47:50 EDT
Thanks for the info Chris. I see that code can be safely excised.
Now on to what I was really trying to do in the first place (get Cocoa to
review unsaved documents). I realized I actually had to explicitly set the
document dirty flag in each method that changed the document. But it doesn't
seem to be working.
From within a NSDocument subclass:
for(controllersIndex = [theWindowControllers count]-1; controllersIndex >
= 0; controllersIndex--)
{ // Loop through all controllers for this document and set
dirty flag on each window
[[[theWindowControllers objectAtIndex:controllersIndex] window]
setDocumentEdited:YES];
}
// ---------Test to see if doc set dirty
areEditedDocs = [[NSDocumentController sharedDocumentController]
hasEditedDocuments];
// ---------Test to see if doc set dirty
I get 'areEditedDocs' == NO.
-Jim
_______________________________________________
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.