Re: controlTextDidChange, backspace possible?
Re: controlTextDidChange, backspace possible?
- Subject: Re: controlTextDidChange, backspace possible?
- From: Ondra Cada <email@hidden>
- Date: Tue, 14 Sep 2004 19:24:35 +0200
Uli,
On 14.9.2004, at 18:00, M. Uli Kusterer wrote:
Length-limiting text entry fields is a common enough problem that I
don't get why there isn't a solution built in already.
... I beg to differ. To limit lenght is definitely not a task for a
field, and not quite for a formatter, either. If at all, it looks
like a controller-level thing: what about exploiting validation?
Could you elaborate?
It does not seem to me to be the GUI task at all to decide how many
characters fits there. IMHO, it belongs to the model, or at the very
least the controller, level.
At the moment I don't have the time to test it, but I think that some
combination of a controller-level validator and perhaps a formatter
which keeps checking and presents the text in red with a tooltip
showing the cause of the problem if it does not validate (like, since
it is too long by N chars) would be the way to go.
So, you agree that the formatter would be a good approach, but you
would reinforce it by having the controller validate as well?
I think the formatter would *not* actually limit the number of
characters: it would only make sure a validation problem (detected and
reported on the proper level) is shown properly in GUI, presumed it is
not done all right by the framework code itself (which I am not at the
moment sure of and have no time just now to test).
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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