Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]
Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]
- Subject: Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]
- From: Conrad Shultz <email@hidden>
- Date: Tue, 26 Mar 2013 14:14:02 -0700
On Mar 26, 2013, at 2:05 PM, Marco S Hyman <email@hidden> wrote:
>> 3) The TKOutlineView then later attempts to send the <TKOutlineViewDelegate> message from #1 above to its delegate.
>
> The code noted earlier used introspection to ensure the delegate responded
> to the selector before the message was sent. A non TKOutlineViewDelegate
> conforming object won't respond to the selector. The message won't be
> sent. No exception will be raised.
>
> Or did I miss something?
>
> Marc
As currently written it should work. Step #1 in my hypothetical was that in the future a *required* delegate method be added, in which case there would be no -respondsToSelector: check.
If no methods are required in the protocol then my concern would not apply.
-Conrad
_______________________________________________
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