Re: NSTextField, maximum string length, bindings and NSFormatter

2013-10-25 Thread jonat...@mugginsoft.com
Keary On 25 Oct 2013, at 00:21, Keary Suska wrote: > On Oct 24, 2013, at 9:01 AM, jonat...@mugginsoft.com 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. Co

Re: NSTextField, maximum string length, bindings and NSFormatter

2013-10-24 Thread Keary Suska
On Oct 24, 2013, at 9:01 AM, jonat...@mugginsoft.com wrote: > Have I missed something or is access to a decent NSFormatter subclass to > handle NSTextField string length limiting troublesome? > > There is some form on this: > http://stackoverflow.com/questions/827014/how-to-limit-nstextfield-tex

Re: NSTextField, maximum string length, bindings and NSFormatter

2013-10-24 Thread jonat...@mugginsoft.com
Dmitriy On 24 Oct 2013, at 16:41, Dmitriy Balakirev wrote: > For limiting text in NSTextField this works well: (_limit == 5, 30, etc.) > > - (BOOL)isPartialStringValid:(NSString *__autoreleasing *)partialStringPtr > proposedSelectedRange:(NSRangePointer)proposedSelRangePtr >

Re: NSTextField, maximum string length, bindings and NSFormatter

2013-10-24 Thread Dmitriy Balakirev
For limiting text in NSTextField this works well: (_limit == 5, 30, etc.) - (BOOL)isPartialStringValid:(NSString *__autoreleasing *)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr originalString:(NSString *)origString originalSelectedRange:(NS

NSTextField, maximum string length, bindings and NSFormatter

2013-10-24 Thread jonat...@mugginsoft.com
Have I missed something or is access to a decent NSFormatter subclass to handle NSTextField string length limiting troublesome? There is some form on this: http://stackoverflow.com/questions/827014/how-to-limit-nstextfield-text-length-and-keep-it-always-upper-case/827598#827598 http://www.coc