Re: controlTextDidChange, backspace possible?
Re: controlTextDidChange, backspace possible?
- Subject: Re: controlTextDidChange, backspace possible?
- From: Harilaos Skiadas <email@hidden>
- Date: Tue, 14 Sep 2004 10:21:37 -0700 (PDT)
--- Peter Karlsson <email@hidden> wrote:
> It seems to work except if I type a character in the
> middle of a 32
> character string, the cursor moves one character to
> the right for every time
this is probably because the field editor that handles
the editing was not told about your change in the
string in the field, so it simply moved the selection.
You probably want to get hold of the field editor by
using NSWindow's fieldEditor:forObject: method, and
then call setSelectedRange on the Editor to move the
selection one step back. A bit of a hack really (I
mean, the text editor should be told not to move it on
the first place, not told to bring it back) but it
might work.
> I type a character. I want the cursor to stand
> still!
>
> It's strange that a common thing like this is so
> hard in OS X. Why don't
> have a field in IB where I just type 32 for length,
> period!
I guess the point is that you should not be thinking
of text fields as simple objects. They are more
complex than text views, since a field editor handles
the editing in them anyway. I've been having a lot of
trouble with them lately too. Could someone recommend
to us some good tutorials explaining more advanced
issues with regards to text fields?
>
> Peter
>
Haris
__________________________________
Do you Yahoo!?
Yahoo! Mail Now with 25x more storage than before!
http://promotions.yahoo.com/new_mail
_______________________________________________
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