Re: DocumentController & ApplicationController: messages between them?
Re: DocumentController & ApplicationController: messages between them?
- Subject: Re: DocumentController & ApplicationController: messages between them?
- From: Matt Neuburg <email@hidden>
- Date: Mon, 13 May 2002 11:39:16 -0700
On Sat, 11 May 2002 17:15:19 -1000, Carlos Weber <email@hidden> said:
>
First, you can make you AppController object your application's
>
delegate; then you can always find it using [NSApp delegate].
D'oh! I knew I was leaving one out. Actually this sort of comes under the
head of what I said about class methods.
>
Second, don't forget that the "FirstResponder" icon can be a control's
>
target, and that you can add actions to it. If you want a specific
>
action performed, and no object in the responder chain responds to it,
>
the chain eventually gets to the application and its delegate object.
Yes, it was silly of me to leave this out too. Beginners have a little
trouble with the "FirstResponder" because it is isn't a proxy for any
particular thing; it just means "whatever happens to be at the bottom of
the responder chain at any particular moment", and is there as a way of
letting you get your message into the responder chain from the bottom. Your
application delegate is at the top of the chain. The OP should read:
Cocoa/TasksAndConcepts/ProgrammingTopics/BasicEventHandling/index.html
In short, if there's a problem here it's an embarras de richesses. There
are lots of ways to get in touch with your application's delegate, and
which one you use depends on considerations of convenience and
architectural neatness. m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.