Update NSTabView.h to declare a formal protocol for NSTabViewDelegate for 10.6+

This commit is contained in:
Gregory John Casamento 2021-10-13 23:02:39 -04:00
parent 98ebe51150
commit c814250079
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2021-10-13 Gregory John Casamento <greg.casamento@gmail.com>
* Headers/AppKit/NSTabView.h: Update NSTabView.h to have a formal
protocol for NSTabViewDelegate if the API we are using is 10.6 or
later.
2021-10-13 Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSTableView.m: Remove exception where lastIndex is greater

View file

@ -107,7 +107,14 @@ typedef enum {
@end
@interface NSObject(NSTabViewDelegate)
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
@protocol NSTabViewDelegate <NSObject>
#if GS_PROTOCOLS_HAVE_OPTIONAL
@optional
#endif
#else
@interface NSObject (NSTabViewDelegate)
#endif
- (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)tabView willSelectTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem;