Re: what about registering a transformer in the transformer?
Re: what about registering a transformer in the transformer?
- Subject: Re: what about registering a transformer in the transformer?
- From: "R. Matthew Emerson" <email@hidden>
- Date: Wed, 6 Dec 2006 14:56:18 -0500
On Dec 6, 2006, at 2:17 PM, Marc Respass wrote:
So I always have to paste this code into +initialize of the class
that uses the transformer and I'm looking for a better way
Register all your value transformers in the +initialize method of the
application delegate object.
<http://developer.apple.com/documentation/Cocoa/Conceptual/
ValueTransformers/Concepts/Registration.html#//apple_ref/doc/uid/
20002166>
(which makes me wonder if I can register using a different name - I
always use the class name - but that's beside the point).
You can, e.g.,
t = [[LinearFormTransformer alloc] init];
[t setMultiplier:9.0/5.0];
[t setOffset:32];
[NSValueTransformer setValueTransformer:(NSValueTransformer *)t
forName:@"CelsiusToFahrenheit"];
[t release];
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden