Re: Equivalent of UITextField's textField:shouldChangeCharactersInRange:replacementString for NSTextField

2011-09-28 Thread Eric Wing
We really recommend looking at the approach I described earlier using NSFormatter subclass for input validation. Unfortunately, I am not actually formatting or validating anything so this isn't helpful for me. I am working on a middle-layer framework and what I am interested in is the text

Re: Equivalent of UITextField's textField:shouldChangeCharactersInRange:replacementString for NSTextField

2011-09-27 Thread Eric Wing
On 9/21/11, Jens Alfke j...@mooseyard.com wrote: On Sep 21, 2011, at 7:42 PM, Eric Wing wrote: I have been using the delegate callback textField:shouldChangeCharactersInRange:replacementString for UITextField. I am trying to port code over to Mac using NSTextField. Is there something that

Re: Equivalent of UITextField's textField:shouldChangeCharactersInRange:replacementString for NSTextField

2011-09-27 Thread Aki Inoue
Eric, We really recommend looking at the approach I described earlier using NSFormatter subclass for input validation. - (BOOL)isPartialStringValid:(NSString **)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr originalString:(NSString *)origString

Re: Equivalent of UITextField's textField:shouldChangeCharactersInRange:replacementString for NSTextField

2011-09-22 Thread Aki Inoue
Actually, the most of functionality provided by the UITextField method is better implemented by a formatter subclass with NSTextField. Aki Inoue On 2011/09/21, at 19:49, Jens Alfke j...@mooseyard.com wrote: On Sep 21, 2011, at 7:42 PM, Eric Wing wrote: I have been using the delegate

Equivalent of UITextField's textField:shouldChangeCharactersInRange:replacementString for NSTextField

2011-09-21 Thread Eric Wing
I have been using the delegate callback textField:shouldChangeCharactersInRange:replacementString for UITextField. I am trying to port code over to Mac using NSTextField. Is there something that provides similar functionality? Thanks, Eric -- Beginning iPhone Games Development

Re: Equivalent of UITextField's textField:shouldChangeCharactersInRange:replacementString for NSTextField

2011-09-21 Thread Jens Alfke
On Sep 21, 2011, at 7:42 PM, Eric Wing wrote: I have been using the delegate callback textField:shouldChangeCharactersInRange:replacementString for UITextField. I am trying to port code over to Mac using NSTextField. Is there something that provides similar functionality? Yes, but it’s a