NSValueTransformer subclass doesn't recognise copyWithZone. So?
NSValueTransformer subclass doesn't recognise copyWithZone. So?
- Subject: NSValueTransformer subclass doesn't recognise copyWithZone. So?
- From: John Lombardo <email@hidden>
- Date: Thu, 6 May 2004 19:06:59 +0800
When trying to use my NSValueTransformer subclass I get the following
error:
*** -[BBStringToNumberTransformer copyWithZone:]: selector not
recognized
Has anyone else had this before? I haven't seen anyone else
implementing any Copying protocols, so I don't understand where the
problem is. I've even tried commenting out the entire
-transformedValue: block to no avail. Replacing
BBStringToNumberTransformer with NSValueTransformer gave the same
copyWithZone: error, which isolated the problem to my use of it. Below
are the relevant code samples:
+ (void)initialize
{
BBStringToNumberTransformer *transformer =
[[[BBStringToNumberTransformer alloc] init] retain];
[NSValueTransformer setValueTransformer:transformer
forName:@"StringToNumberTransformer"];
}
...
if ([[[recordArray lastObject] objectForKey:key]
isEqualToString:@"int4"])
[bindingOptions setObject:[NSValueTransformer
valueTransformerForName:@"StringToNumberTransformer"]
forKey:@"NSValueTransformerName"];
[[lookupTable tableColumnWithIdentifier:key]
bind:@"value"
toObject: recordController
withKeyPath:[NSString stringWithFormat:@"arrangedObjects.%@", key]
options:bindingOptions];
...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.