NSPrintInfo and updateChangeCount problems
NSPrintInfo and updateChangeCount problems
- Subject: NSPrintInfo and updateChangeCount problems
- From: Manfred Lippert <email@hidden>
- Date: Fri, 4 Oct 2002 19:31:25 +0200
Hi,
as described in the printing documentation of Cocoa (see below), I am
trying to store an NSPrintInfo object inside my document's files of my
document-based application:
-----------------------------
The second case of saving print info objects applies to document-based
applications. Print settings are often document specific. [ ... ]
As before, you should encode the NSPrintInfo object into an NSData
object. Then, you should write the data to the document's file.
-----------------------------
OK, I have no problems storing the archived NSPrintInfo in my
document's files.
I have a little problem after loading my documents:
Every time the document is opened, I unarchive the NSPrintInfo and call
setPrintInfo for my NSDocument.
The problem: This changes the updateChangeCount of the document! So
every "fresh" loaded document is in "dirty" state. I tried to call
[self updateChangeCount:NSChangeCleared] for my NSDocument, but
unfortunately this does not clear the dirty state! Why is this? How can
I make my document state "clean" after loading it and setting its
NSPrintInfo?
Apart from that, the archiving/unarchiving and setting of the
NSPrintInfo works fine. Each document has its own NSPrintInfo now. But
the dirty document state after loading is really annoying.
Please help,
Mani
_______________________________________________
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.