Thanks.  It appears that the instancetype didn't help, as I had already 
converted the init method to return the instancetype instead of id.

Yeah, oddly enough, the object that's conforming to the protocol is using 
delegate/protocol and calling a method in the delegate - which isn't even 
declared in the protocol.  I don't know how it worked in the first place.

Spooky code is spooky.

Thanks, Jens.  Always appreciated.

On Nov 9, 2015, at 2:20 PM, Jens Alfke wrote:

> 
>> On Nov 9, 2015, at 10:58 AM, Alex Zavatone <z...@mac.com> wrote:
>> 
>> Before I give it a shot, is this a case where using instancetype to return 
>> the instance of the object that holds the method a better choice than id?
> 
> It sounds like your delegate API is using the old “informal protocol” 
> mechanism where you declare the methods in a category on NSObject. Instead, 
> it’s best to define a protocol for the delegate type and always refer to the 
> delegate using that protocol. (You’ve probably seen that AppKit and 
> Foundation switched over to this a few years ago.)
> 
> —Jens

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to