I have a calculation project using buttons to input numbers into a UILabel. I
want it to format the numbers as they are entered to display grouping
separators. It has been a struggle but so far the best I have ben able to
achieve is this (I got the basic idea from a post at stackoverflow.com):
> Subject: Re: Numeric Entry and Formatting With NSNumberFormatter Won't
> Append Zeros
> To: Philip McIntosh
> Cc: cocoa-dev@lists.apple.com
> Message-ID: <62796e49-61ed-4b4a-8315-bdeaabeb4...@manoverboard.org>
> Content-Type: text/plain; charset=windows-1252
> Message: 11
> Date: Wed, 28 Sep 2011 09:28:42 -0700
> From: Kyle Sluder
> Subject: Re: Numeric Entry and Formatting With NSNumberFormatter Won't
> Append Zeros
> To: Philip McIntosh
> Cc: "cocoa-dev@lists.apple.com"
> Message-ID: <053c
decimal point is detected I no
longer call the formatter and I let the string be appended after the decimal
point with no further formatting. It's working so far.
> On Sep 28, 2011, at 4:26 PM, Quincey Morris wrote:
>
>> On Sep 28, 2011, at 15:50 , Philip McIntosh wrote:
>>
I am just wondering about something with respect to the Model-View-Controller
(MVC) design pattern. Should any validation of input or output be done by the
model class which is handling and processing the data, or is validation more
properly a task to be assigned to a controller
class?