#import "PSAction.h"
#import "PSActionInspector.h"

@implementation PSActionInspector

- init
{
	char buffer[MAXPATHLEN];
	id bundle = [NXBundle bundleForClass:[PSAction class]];

	[super init];

	[bundle getPath:buffer forResource:"PSActionInspector" ofType:"nib"];

	[NXApp loadNibFile:buffer owner:self withNames:NO fromZone:[self zone]];

	return self;
}

- ok:sender
{
	[object setEnabled:![disabledSwitch state]];

	[object setCacheCleared:[clearSwitch state]];

	[object setErrorReported:[errorsSwitch state]];

	return [super ok:sender];
}

- revert:sender
{
	[disabledSwitch setState:![object isEnabled]];

	[clearSwitch setState:[object isCacheCleared]];

	[errorsSwitch setState:[object isErrorReported]];

	return [super revert:sender];
}

- (BOOL) wantsButtons { return NO; }

@end
