The Magic Delegate
The Magic Delegate
- Subject: The Magic Delegate
- From: Paul Sargent <email@hidden>
- Date: Fri, 16 Nov 2007 14:01:28 +0000
I'm looking at the Cocoa CoreData Application template in Xcode 3, and
something has me a little puzzled.
The only class in the template is <projectname>_AppDelegate. It's a
bit of a stretch in naming because the only delegate method in it is
applicationShouldTerminate:, but sure enough, its set as the
NSApplication delegate when the App is run, and
applicationShouldTerminate: does its stuff.
Why question is how?
There are no calls to setDelegate: in the project, and IB shows no
connection to the delegate outlet of the application instance.
So how is this class being set as the delegate for the NSApplication?
Is there another method of doing this that I don't know about?
Is it magic?
Paul (Trying to get his head around some of the stuff behind the
curtain)
_______________________________________________
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