I was looking at the docs for NSTableViewDataSource and they say that this protocol is only available on osx 10.6. How can this be? Isn’t NSTableViewDataSource the object that contains all the data for your NsTableView?
I was looking at the docs for NSTableViewDataSource and they say that this protocol
Share
To add what @Zydeco wrote,
@protocols in Objective-C didn’t have@optionalattributes before 10.5. So, Apple couldn’t use@protocolto define what are the delegate methods, because the delegate objects choose to implement only a part of delegate methods. Apple used something called an informal protocol in those olden days, which were justNSObjectcategories.Now that they introduced the way to mark some methods as
@optionalin a@protocol, they decided to make every delegate a formal protocol in 10.6. This way there can be more compile-time checking. But the functionality has not changed.See the official documentation on the protocols for more info.