Skip navigation.
 
mlHow do copy:/past: messages get sent to NSDocument?
FROM : Adam P Jenkins
DATE : Mon Feb 25 21:55:40 2008

I'm going through the NSPersistentDocument Core Data Tutorial, which 
leads you through creating a Core Data Document based application.  In 
the section where they demonstrate implementing copy/paste, they have 
you add copy: and paste: methods to the MyDocument class, which is a 
subclass of NSPeristentDocument.  What I don't see is how these 
methods end up getting called.  I see in IB that the Copy and Paste 
commands are setup to send a copy: and paste: message to the 
FirstResponder object.  NSDocument is not itself a NSResponder 
subclass so I assume it can't be in the responder chain, which means 
that there must be some setup in document based apps so that certain 
messages get forwarded on to the current NSDocument under some 
circumstances.  Does anyone know where this is documented, so I can 
see exactly which events get forwarded to the document and under which 
circumstances?  Thank you.

Adam

Related mailsAuthorDate
mlHow do copy:/past: messages get sent to NSDocument? Adam P Jenkins Feb 25, 21:55
mlRe: How do copy:/past: messages get sent to NSDocument? I. Savant Feb 25, 22:09
mlRe: How do copy:/past: messages get sent to NSDocument? Adam P Jenkins Feb 25, 23:03
mlRe: How do copy:/past: messages get sent to NSDocument? I. Savant Feb 26, 00:29