Re: NSTextField, maximum string length, bindings and NSFormatter
Re: NSTextField, maximum string length, bindings and NSFormatter
- Subject: Re: NSTextField, maximum string length, bindings and NSFormatter
- From: "email@hidden" <email@hidden>
- Date: Fri, 25 Oct 2013 09:46:49 +0100
Keary
On 25 Oct 2013, at 00:21, Keary Suska <email@hidden> wrote:
> On Oct 24, 2013, at 9:01 AM, email@hidden wrote:
>
>> Have I missed something or is access to a decent NSFormatter subclass to handle NSTextField string length limiting troublesome?
>>
>> I am currently using the following. Comments, suggested improvements etc welcome.
>
> I recall that this can be tricky. Below is a method that I dug up from an old NSFormatter subclass that handles both min/max lengths, non-stored delimiters and filtering to acceptable characters, which I recall is also paste-proof. I can send the whole class files if you care.
>
Your class method is obviously more fully featured than mine.
Would you mind making the whole class available somehow?
The more decent examples of how to do this the better.
As you say this can be tricky to get right and yet it is rather fundamental.
I still wonder why AppKit doesn't supply a concrete text formatting subclass.
Jonathan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden