• 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: controlTextDidChange, backspace possible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: controlTextDidChange, backspace possible?
      • From: "M. Uli Kusterer" <email@hidden>
References: 
 >controlTextDidChange, backspace possible? (From: "Peter Karlsson" <email@hidden>)
 >Re: controlTextDidChange, backspace possible? (From: "M. Uli Kusterer" <email@hidden>)
 >Re: controlTextDidChange, backspace possible? (From: Ondra Cada <email@hidden>)
 >Re: controlTextDidChange, backspace possible? (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Re: controlTextDidChange, backspace possible?
  • Next by Date: Re: controlTextDidChange, backspace possible?
  • Previous by thread: Re: controlTextDidChange, backspace possible?
  • Next by thread: Re: controlTextDidChange, backspace possible?
  • Index(es):
    • Date
    • Thread