From f557fb4d2b84e5948f54a5fbb0a645a5f97b83dd Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Wed, 3 Jul 2013 06:57:46 +0000 Subject: Get rid of the messy preprocessor hack for named sliders on the audio plug-ins for OS X: Consolidate files that are the same. Whatever class loads a nib, will be that owner, no matter what the nib says. Have shared code be in a dylib that loads, so there isn't warnings about conflicting classes. Other changes git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85757 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- .../plugins/DFSound/macsrc/SPUPluginController.m | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 macosx/plugins/DFSound/macsrc/SPUPluginController.m (limited to 'macosx/plugins/DFSound/macsrc/SPUPluginController.m') diff --git a/macosx/plugins/DFSound/macsrc/SPUPluginController.m b/macosx/plugins/DFSound/macsrc/SPUPluginController.m new file mode 100644 index 00000000..bfc11f01 --- /dev/null +++ b/macosx/plugins/DFSound/macsrc/SPUPluginController.m @@ -0,0 +1,57 @@ +// +// SPUPluginController.m +// PeopsSPU +// +// Created by C.W. Betts on 7/2/13. +// +// + +#import "SPUPluginController.h" + +@implementation SPUPluginController + +static inline void FuncNotAvailable(id sel, id sender, SEL theCmd) +{ +#ifdef DEBUG + NSLog(@"Class %@ does not implement %@, and was sent a(n) %@ with the description %@", [sel class], NSStringFromSelector(theCmd), [sender class], [sender description]); + if ([sel isMemberOfClass:[SPUPluginController class]]) { + NSLog(@"For one thing, the class %@ isn't supposed to be accessed directly, just subclassed!", [SPUPluginController class]); \ + } else { + NSLog(@"You should implement %@ for your class %@. As it is, you are calling %@ from the superclass %@.", NSStringFromSelector(theCmd), [sel class], NSStringFromSelector(theCmd), [SPUPluginController class]); + } +#endif + [sel doesNotRecognizeSelector:theCmd]; +} + +#define NotAvailableWarn() FuncNotAvailable(self, sender, _cmd) + +- (IBAction)cancel:(id)sender +{ + NotAvailableWarn(); + +} + +- (IBAction)ok:(id)sender +{ + NotAvailableWarn(); +} + +- (IBAction)reset:(id)sender +{ + NotAvailableWarn(); +} + +- (void)loadValues +{ +#ifdef DEBUG + NSLog(@"Class %@ does not implement %@", [self class], NSStringFromSelector(_cmd)); + if ([self isMemberOfClass:[SPUPluginController class]]) { + NSLog(@"For one thing, the class %@ isn't supposed to be accessed directly, just subclassed!", [SPUPluginController class]); + } else { + NSLog(@"You should implement %@ for your class %@. As it is, you are calling %@ from the superclass %@.", NSStringFromSelector(_cmd), [self class], NSStringFromSelector(_cmd), [SPUPluginController class]); + } +#endif + [self doesNotRecognizeSelector:_cmd]; +} + +@end -- cgit v1.2.3