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: Quincey Morris <email@hidden>
- Date: Tue, 26 Mar 2013 13:40:06 -0700
On Mar 26, 2013, at 13:11 , Conrad Shultz <email@hidden> wrote:
> If code expecting an NSOutlineView receives a TKOutlineView instance it may break or behave unexpectedly since it may well try to set a delegate conforming to <NSOutlineViewDelegate> but you have made your class require a delegate conforming to the more specific <TKOutlineViewDelegate>.
Chris's delegate actually implements NSOutlineViewDelegate, doesn't it?
Lee Ann's earlier suggestion of declaring TKOutlineViewDelegate to conform to NSOutlineViewDelegate would prevent any remaining compiler complaints. Thus the final declaration of the protocol would look like:
@protocol TKOutlineViewDelegate <NSObject,NSOutlineViewDelegate>
Would that take care of your concern?
_______________________________________________
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