I have a self registering NSValueTransformer that requires a binding.
@interface MyValueTransformer : NSValueTransformer { IBOutlet NSTabView *tabView; } + (Class)transformedValueClass; + (BOOL)allowsReverseTransformation; - (id)transformedValue:(id)value; @implementation MyValueTransformer // from http://www.gigliwood.com/weblog/ + (void)load { NSLog(@"registered %@", NSStringFromClass([self class])); NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];NSValueTransformer *theTransformer = [[[self alloc] init] autorelease]; [NSValueTransformer setValueTransformer:theTransformer forName:NSStringFromClass([self class])];
[pool release]; } + (Class)transformedValueClass { return [NSNumber class]; } + (BOOL)allowsReverseTransformation { return NO; } - (id)transformedValue:(id)value { NSLog(@"transforming value %@ for view %@", value, tabView); return [NSNumber numberWithInt:0]; } @endI've instantiate it through the NIB. Which works fine! I do see the NSLog lines and all. Unfortunately the IBOutlet stays nil ...but in the bindings inspector I can see the proper binding on the transformer.
Any idea? cheers -- Torsten
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]