Re: Abusing targetForAction: with non-action selectors
Re: Abusing targetForAction: with non-action selectors
- Subject: Re: Abusing targetForAction: with non-action selectors
- From: Dave Dribin <email@hidden>
- Date: Mon, 15 Sep 2008 19:05:42 -0500
On Sep 15, 2008, at 6:56 PM, Graham Cox wrote:
I think you have this a bit backwards, possibly.
You still have to get notified when the first responder changes in
order to tell your info panel to reorganise itself, so why not use
that notification to directly obtain the correct target? Objects
that can be displayed by your info panel will send a notification
that they have become active, sending themselves as the notifier.
The info panel receives that notification and so already has the
desired target. It then just needs to check what protocols or
methods the notifier responds to and set up its UI accordingly.
It's really not that simple in this case, and the architecture is
basically out of my hands. I'm "watching" first responder changes by
listening to NSApplicationDidUpdateNotification, FWIW.
-Dave
_______________________________________________
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