I've tried to send the following mail already four times with GNUMail, but it
never arrived... This time via the web interface:
---------- Forwarded message ----------
Date: 2006-02-02 22:56:36 +0100
From: Ingolf Jandt <[EMAIL PROTECTED]>
Subject: patch for NSTextField (input validation)
I've attached a quick and dirty patch to enable input validation via
NSFormatter objects. It works perfectly for my requirements, but I haven't
tested with the GNUstep-provided formatters. (Should work without problems
anyway IMHO)
Ingolf Jandt
______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130
504a505,510
>
> if (_text_object)
> {
> NSString *dummy = AUTORELEASE([[_text_object string] copy]);
> ASSIGN (_oldString, dummy);
> }
530c536
<
---
>
550c556
< NSLog (@"Unimplemented: should set string to %@", newString);
---
> // NSLog (@"Unimplemented: should set string to %@", newString);
552c558,560
< //[_text_object setString: newString];
---
> NSRange range = [_text_object selectedRange];
> [_text_object setString: newString];
> [_text_object setSelectedRange: range];
559c567,571
< NSLog (@"Unimplemented: should delete last typed character");
---
> // NSLog (@"Unimplemented: should delete last typed character");
> NSRange range = [_text_object selectedRange];
> range.location--;
> [_text_object setString: _oldString];
> [_text_object setSelectedRange: range];
562c574,578
<
---
> {
> NSString *dummy= AUTORELEASE( [[_text_object string] copy]);
> ASSIGN(_oldString, dummy);
> }
>
44a45
> NSString *_oldString;
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev