Re: PDFDocument Subclass and Undo Manager Redux
Re: PDFDocument Subclass and Undo Manager Redux
- Subject: Re: PDFDocument Subclass and Undo Manager Redux
- From: Kevin Ross <email@hidden>
- Date: Mon, 14 Jul 2008 09:04:14 -0700
Well after making some tweaks I seem to have it working. I'm not sure
if it was something that I did or if the 10.5.4 update could have
fixed the undo manager bug in PDFView. Anyway, I've got it working,
thanks!
- Kevin
On Jul 11, 2008, at 3:31 PM, Kevin Ross wrote:
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
_______________________________________________
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