PDFDocument Subclass and Undo Manager Redux
PDFDocument Subclass and Undo Manager Redux
- Subject: PDFDocument Subclass and Undo Manager Redux
- From: Kevin Ross <email@hidden>
- Date: Fri, 11 Jul 2008 15:31:29 -0700
Hello cocoa-devs! I'm not sure if I'm heading in the right direction
here or if I'm running off into the brush...
I have a PDFDocument subclass that has it's own undoManager. This is
so it can perform transformations upon itself and undo/redo. The
trouble is when I try to integrate it into my NSDocument class. I'll
try to return the PDF's undoManager like so:
- (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)window; {
return [(KRPDFDocument *)[pdfView document] undoManager];
}
While this returns an NSUndoManager which != NULL, it doesn't actually
hook into the responder chain so when I make a change it doesn't
register in the menu. Is this because PDFDocument does not inherit
from NSResponder?
Is the proper way to have the undoManager *in* the PDFDocument
sublcass? Or is it better to use the undoManager provided by
NSDocument?
It seems like I'm missing something that's right in front of my nose,
but if anyone has some insight out there, please let me know! Thanks!
- Kevin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden