The compiler may accept it, but it doesn't interpret it the way you think. You can confirm by checking whether your class formally conforms to the protocols. Try this with your old code and your new code, and compare:
NSLog(@"conforms to protocol? %d", [ImportTool conformsToProtocol:@protocol(NSTableViewDataSource)]); I think Quincey is right, what you really did is declare a generic type. It's a subtle mistake. Notice that this also compiles: @interface ImportTool <X, Y, Z> : NSObject @end --Andy On Mar 28, 2019, at 7:44 PM, Peter Hudson <peter.hud...@me.com> wrote: > > Very strange - the compiler is quite happy with my waywardness. > Peter > >> On 28 Mar 2019, at 23:39, Quincey Morris >> <quinceymor...@rivergatesoftware.com> wrote: >> >>> On Mar 28, 2019, at 15:58 , Peter Hudson <peter.hud...@me.com> wrote: >>> >>> @interface ImportTool <NSTableViewDataSource, NSTableViewDelegate, >>> NSEncoding> : NSObject >> >> You’re Doing It Wrong™. You mean: >> >>> @interface ImportTool : NSObject <NSTableViewDataSource, >>> NSTableViewDelegate, NSEncoding> >> >> >> I don’t know what it means the way you wrote it. Something about lightweight >> generic syntax, perhaps? > > _______________________________________________ > > 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/aglee%40mac.com > > This email sent to ag...@mac.com _______________________________________________ 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