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

@implementation NamedSlider

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

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

- (NSString *)stringValue
{
	NSInteger index = [self integerValue];

	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