Re: NSValueTransformer vs. NSFormatter
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