cog/InfoInspector/MissingAlbumArtTransformer.m

30 lines
510 B
Matlab
Raw Normal View History

2009-03-08 20:04:09 +00:00
//
// MissingAlbumArtTransformer.m
// Cog
//
// Created by Vincent Spader on 3/8/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import "MissingAlbumArtTransformer.h"
@implementation MissingAlbumArtTransformer
+ (Class)transformedValueClass {
return [NSImage class];
}
+ (BOOL)allowsReverseTransformation {
return NO;
}
2009-03-08 20:04:09 +00:00
// Convert from NSImage to NSImage
- (id)transformedValue:(id)value {
if(value == nil) {
2009-03-08 20:04:09 +00:00
return [NSImage imageNamed:@"missingArt"];
}
2009-03-08 20:04:09 +00:00
return value;
}
@end