Add switch/case to handle app ops

This commit is contained in:
Gregory John Casamento 2020-08-04 07:04:21 -04:00
parent 214ff9e638
commit fc617321fe
2 changed files with 36 additions and 5 deletions

View file

@ -87,9 +87,9 @@ APPKIT_EXPORT NSPasteboardTypeTextFinderOptionKey const NSTextFinderMatchingType
}
// Validating and performing
- (void)performAction:(NSTextFinderAction)op;
- (BOOL)validateAction:(NSTextFinderAction)op;
- (void)cancelFindIndicator;
- (void) performAction: (NSTextFinderAction)op;
- (BOOL) validateAction: (NSTextFinderAction)op;
- (void) cancelFindIndicator;
// Properties
- (id<NSTextFinderClient>) client;

View file

@ -33,11 +33,42 @@
@implementation NSTextFinder
// Validating and performing
- (void)performAction:(NSTextFinderAction)op
- (void) performAction: (NSTextFinderAction)op
{
switch (op)
{
case NSTextFinderActionShowFindInterface:
break;
case NSTextFinderActionNextMatch:
break;
case NSTextFinderActionPreviousMatch:
break;
case NSTextFinderActionReplaceAll:
break;
case NSTextFinderActionReplace:
break;
case NSTextFinderActionReplaceAndFind:
break;
case NSTextFinderActionSetSearchString:
break;
case NSTextFinderActionReplaceAllInSelection:
break;
case NSTextFinderActionSelectAll:
break;
case NSTextFinderActionSelectAllInSelection:
break;
case NSTextFinderActionHideFindInterface:
break;
case NSTextFinderActionShowReplaceInterface:
break;
case NSTextFinderActionHideReplaceInterface:
break;
default:
break;
}
}
- (BOOL)validateAction:(NSTextFinderAction)op
- (BOOL) validateAction: (NSTextFinderAction)op
{
return NO;
}