summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFSound/macsrc/NamedSlider.m
blob: fd07780a131829c1bf0859c9003dbbe4cb4208bb (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
#import "NamedSlider.h"

@implementation NamedSlider

- (void)dealloc
{
	[strings release];
	[super dealloc];
}

- (void)setStrings:(NSArray *)theStrings
{
	[strings release];
	strings = [theStrings retain];
}

- (NSString *)stringValue
{
	int index = [self intValue];
	
	if (index >= 0 && index < [strings count])
		return [strings objectAtIndex:index];
	
	return @"(Unknown)";
}

- (void)setIntValue:(int)value
{
	[super setIntValue:value];
	[self sendAction:[self action] to:[self target]];
}

@end