• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSValueTransformer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSValueTransformer
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: Regular Expressions
  • Next by Date: Re: Removing quit button from dock menu
  • Previous by thread: Re: Regular Expressions
  • Next by thread: Re: NSValueTransformer
  • Index(es):
    • Date
    • Thread