Re: Inserting my own Responder before App?
Re: Inserting my own Responder before App?
- Subject: Re: Inserting my own Responder before App?
- From: Ken Thomases <email@hidden>
- Date: Wed, 23 Apr 2008 14:25:32 -0500
On Apr 23, 2008, at 1:20 PM, Rick Mann wrote:
My code currently inserts my controller between the app and whatever
the app is pointing to. (I don't know what happens if an app
delegate is installed after that.)
I really need for my controller to be created at launch, but not its
window. I don't know if that's happening yet. But even though its
window may never be shown, it still needs to be there to support
other app operations, and to respond to the import action.
It seems like you're combining the role which might be called the
"application controller" and a window controller. If you are dealing
with a window controller which has no window to control, then that
smells like you're fighting the framework.
The app controller is usually just an instance of a custom class
(subclassing from NSObject or whatever). It is also usually set up as
the application delegate. You can even instantiate it in the main nib
and hook up the File's Owner's delegate outlet to point to it.
Although the delegate comes after the application object in the
responder chain, you don't typically care. The application
_delegates_ almost everything to its delegate. :) Well, everything
which isn't completely generic.
This is the "normal" way for implementing custom application-global
actions. Implement them on the application delegate.
Cheers,
Ken
_______________________________________________
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