//
//  OACountNot0.m
//  Flash
//
//  Created by Nicholas Matsakis on 8/30/07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import "OACountNot0.h"


@implementation OACountNot0

+ (Class) transfomedValueClass
{
    return [NSNumber class];
}

+ (BOOL) allowsReverseTransformation
{
    return NO;
}

- (id)transformedValue:(id)value
{
    if (![value respondsToSelector:@selector(count)]) {
        [NSException raise:@"BadValue" 
                    format:@"%@ of type %@ does not respond to selector(count)", value, [value class]];
    }
    return [NSNumber numberWithBool:[value count] != 0];
}

@end
