help-gnustep
[Top][All Lists]
Advanced

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

once more textfield size limiting


From: reuss
Subject: once more textfield size limiting
Date: Tue, 03 Feb 2004 20:58:55 GMT
User-agent: Pan/0.11.2 (Unix)

i have nstextfield called label
i made a delegate for it:
[label setDelegate: self];
i would like to restrict text input to 10 chars

i was told that i should use control:textShouldBeginEditing:
method or implement a new one with
textView:shouldChangeTextInRange:replacementString:

but i dont know how
in my case, what is NSControl to use? and what NSText? (I tried [label
currentEditor], but it caused parser error.

if I used - textDidChange: Notification
I saw the input candidats but when I tried to restrict with
setStringValue , the field lost focus and input stopped.

have someone a short snippet or link with snippet to see"
thanks
andras


reply via email to

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