• 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: NSTextField Change Characters!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField Change Characters!


  • Subject: Re: NSTextField Change Characters!
  • From: Esteban Uribe <email@hidden>
  • Date: Fri, 11 Apr 2003 01:00:39 -0700

Hi,
On Friday, April 11, 2003, at 12:30 AM, Chad Eckles wrote:

> How can I change a Character in a NSTextField say this was the Text
> in the
> TextField "A B C D E" how could I Char at D to day F or keep Text from
> being
> entered in the C spot ?

Subclass or be a delegate of NSTextField and respond to
- (BOOL)textView:(NSTextView *)textView
shouldChangeTextInRange:(NSRange)affectedCharRange
replacementString:(NSString *)replacementString

Do text validation checks of your own, return YES if you like the text
change attempted.
NO otherwise.

;-)

-Esteban
_______________________________________________
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.

References: 
 >NSTextField Change Characters! (From: Chad Eckles <email@hidden>)

  • Prev by Date: Re: toolbar item validation extremely inefficient
  • Next by Date: Re: NSData object
  • Previous by thread: NSTextField Change Characters!
  • Next by thread: How to find "RECOMMENDED APPLICATION/PREFERRED APPLICATION" to open an Image?
  • Index(es):
    • Date
    • Thread