• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: limit text input in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: limit text input in NSTextView
      • From: Bill Cheeseman <email@hidden>
    • Re: limit text input in NSTextView
      • From: Douglas Davidson <email@hidden>
    • Re: limit text input in NSTextView
      • From: Sherm Pendley <email@hidden>
References: 
 >Re: limit text input in NSTextView (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: NSURL question with user name and pwd in the URL..
  • Next by Date: Re: limit text input in NSTextView
  • Previous by thread: Re: limit text input in NSTextView
  • Next by thread: Re: limit text input in NSTextView
  • Index(es):
    • Date
    • Thread