开发者

Why do I get no warning when protocol methods are not specified?

开发者 https://www.devze.com 2023-02-18 07:34 出处:网络
Merged with Why do I get no warning when protocol methods are not specified?. I\'m using Xcode 4, have a simple class interface defined and I added NSTableViewDelegate and NSTableViewData
Merged with Why do I get no warning when protocol methods are not specified?.

I'm using Xcode 4, have a simple class interface defined and I added NSTableViewDelegate and NSTableViewDataSource protocols to the interface definition. I.e, @interface foo : NSObject < NSTableViewDelegate, NSTableViewDataSource>

In my build settings, I have confirmed that the option "Incomplete Objective-C Protocols" warning is enabled (for Debug/Any Architecture etc) and I should get a compile time warning for the non-optional methods required for the NSTableViewDataSource protocol. However, I get no warnings at all but 开发者_StackOverflow中文版then at runtime I see the message in the log that the methods aren't defined.

Anyone know why?

0

精彩评论

暂无评论...
验证码 换一张
取 消