Re: controlTextDidChange, backspace possible?
Re: controlTextDidChange, backspace possible?
- Subject: Re: controlTextDidChange, backspace possible?
- From: John Tsombakos <email@hidden>
- Date: Tue, 14 Sep 2004 15:03:23 -0400
>
> From: "Peter Karlsson" <email@hidden>
> Date: 2004/09/14 Tue PM 02:25:53 EDT
> To: email@hidden, email@hidden
> Subject: Re: controlTextDidChange, backspace possible?
>
> You must mean textShouldBeginEditing, right?
>
> Peter
Well I solved the problem of the delegate not being called. It has to be named:
-(BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)textObject
Then it gets called. But not consistantly. I added a second text field to the window, to have something to tab between. It gets called the for the first character I type into the field, but not for subsequent ones. If I tab out and back it gets called for the first key again. If I put more text in the field then I'm checking for, it lets it go, but if I tab out and back, it's then called for each key I try to hit. My routine is a simple check to see if the length of the string is more than a certain number. If so it beeps and returns NO. If it's less, it returns YES.
I was just trying a simple solution - looks like more work to limit the number of characters. I'll keep an eye on the thread for the eventual solution.
thanks,
jt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden