blob: 8411481d1fd91ce19a9af044730271a9b5a824b7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#import "NamedSlider.h"
@implementation NamedSlider
@synthesize pluginClass;
@synthesize strings;
#if !__has_feature(objc_arc)
- (void)dealloc
{
self.strings = nil;
self.pluginClass = nil;
[super dealloc];
}
#endif
- (NSString *)stringValue
{
NSInteger index = [self integerValue];
if (index >= 0 && index < [strings count])
return [strings objectAtIndex:index];
if (!pluginClass) {
return @"(Unknown)";
} else {
return [[NSBundle bundleForClass:pluginClass] localizedStringForKey:@"(Unknown)" value:@"" table:nil];
}
}
- (void)setIntValue:(int)value
{
[super setIntValue:value];
[self sendAction:[self action] to:[self target]];
}
- (void)setIntegerValue:(NSInteger)anInteger
{
[super setIntegerValue:anInteger];
[self sendAction:[self action] to:[self target]];
}
@end
|