Re: Subclassing NSWindowController
Re: Subclassing NSWindowController
- Subject: Re: Subclassing NSWindowController
- From: Dietrich Epp <email@hidden>
- Date: Fri, 6 Dec 2002 16:09:48 -0800
On Thursday, December 5, 2002, at 03:26 , Steve Martin wrote:
by default, I understand the Open and Save menu items will be disabled
unless they are connected to Action methods (which can be done by
ctl-dragging in IB). I think the normal way to handle this is with a
delegate for the NSApplication that contains these Action methods and
tells the document to save itself.
No.
The way to handle this is to connect Open & Save to the first
responder. This is done by default, so nothing needs to be connected.
First, the app tries to send the save: message to the first responder,
then the next, until it succeeds. After the window, the next message
will be sent to the window's delegate, which should be set to the
window's controller or the document itself.
Make sure that the window's delegate is connected to the window's
controller.
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/
BasicEventHandling/Concepts/AboutRespChain.html
_______________________________________________
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.