• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
PDFDocument Subclass and Undo Manager Redux
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: PDFDocument Subclass and Undo Manager Redux
      • From: Kevin Ross <email@hidden>
  • Prev by Date: XCode 3.1 quits each time after launch
  • Next by Date: Re: NSSpeechSynthesizer lifetime and garbage collected (GC) applications
  • Previous by thread: Re: XCode 3.1 quits each time after launch
  • Next by thread: Re: PDFDocument Subclass and Undo Manager Redux
  • Index(es):
    • Date
    • Thread