Re: limit text input in NSTextView
Re: limit text input in NSTextView
- Subject: Re: limit text input in NSTextView
- From: Marco Binder <email@hidden>
- Date: Mon, 16 Sep 2002 20:05:58 +0200
Am Freitag, 13.09.02 um 22:00 Uhr schrieb Ondra Cada:
On Friday, September 13, 2002, at 09:31 , Arthur Clemens wrote:
What would be the right strategy to create a text input limiter in a
NSTextView?
An NSFormatter sublass.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
OK, I havent tried and Ondra is rarly wrong. just in case my idea is
right and only NSCells take NSFormatters, you might have to subclass
NSTextView and do nothing but override NSResponders
-(void)keyUp:(NSEvent*)event method. If the NSEvent4s
- (NSString*) characters method gives you an "allowed" character, just
pass the event to super, otherwise ignore it.
Never tried, but could work I guess.
marco
--
|\ /| E-Mail: email@hidden WWW: www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.