NSValueTransformer
NSValueTransformer
- Subject: NSValueTransformer
- From: Ivan C Myrvold <email@hidden>
- Date: Mon, 22 Feb 2010 15:01:25 +0100
I have a custom NSValueTransformer which returns the transformedValue as a string in the language set in System preferences
- (id)transformedValue:(id)value {
return [NSString stringWithFormat:@"%@(%@)", foundString, value];
}
Here foundString will be 'Found' if the language is english, or 'Funnet' if it is in norwegian.
So the transformed value will be e.g. 'Found(50)' in english or 'Funnet(50)' if in norwegian.
I have bind the value in a tableview header title, with the Value Transformer field filled in with this value transformer.
This works perfect.
But the application I have developed have the option of changing to a new language, and I have a method which changes all the bound values to the new language.
That also works perfect.
The only exception is the table view header title. How do I change the foundString in the custom NSValue Transformer? Do I have to register the NSValueTransformer again?
Ivan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden