discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

please explain me that:


From: reuss
Subject: please explain me that:
Date: Thu, 05 Feb 2004 01:49:27 GMT
User-agent: Pan/0.11.2 (Unix)

I would like to limit the number of characters to input in my textfield

I posed my question about it, and I got responses, but it is too concise
for me. Could someone help me by examples to understand the following:

> When using an NSTextView, you would implement
> -textView:shouldChangeTextInRange:replacementString: in the delegate and
> rejecting the change (by returning NO) if it would cause the string to
> become too long. In an NSTextField, the text field instance sets itself
> as the delegate for the NSTextView field editor, so you could write a
> custom subclass of NSTextField that implemented
> -textView:shouldChangeTextInRange:replacementString: and use that
> instead of a plain NSTextField.
> 
> (An alternative would be to use formatters, but that isn't implemented
> yet.)
> 
> - Alexander Malmberg

thanks
andras


reply via email to

[Prev in Thread] Current Thread [Next in Thread]