• 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
Re: NSValueTransformer vs. NSFormatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSValueTransformer vs. NSFormatter


  • Subject: Re: NSValueTransformer vs. NSFormatter
  • From: William Bumgarner <email@hidden>
  • Date: Sat, 15 Apr 2006 12:53:29 -0700

On Apr 15, 2006, at 12:18 PM, Guy Meyer wrote:
The formatting can be done by sub classing NSFormatter or NSValueTransformer.

Coding wise I think both implementation will require the same effort.

Which of the above is preferred ?

Formatters are for formatting data for presentation (and entry). I.e. formatters are explicitly aimed to the View layer.


Value transformers are, as their name implies, specifically to transform a value from one type to another. Often, a value transformer might be used to convert something from one type to a type that is compatible with a formatter.

From your description, it sounds like a formatter is more appropriate.

b.bum
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSValueTransformer vs. NSFormatter (From: Guy Meyer <email@hidden>)

  • Prev by Date: Re: Progress bar on front NSPanel is grey not blue??
  • Next by Date: KeyValuePair entity concept and bindings
  • Previous by thread: NSValueTransformer vs. NSFormatter
  • Next by thread: KeyValuePair entity concept and bindings
  • Index(es):
    • Date
    • Thread