TITokenField scroll to the last token
If there are many tokens in the token filed, it can be scrolled. The token field will scroll to the last token position whenever one of the token is touched. How could i forbid this? As the touched token could be scrolled out of the view, it is not that user friendly.
Should be just a matter of adding a scrollRectToVisible call. I'll take a look.
I don't think so. You did not call scrollRectToVisible at all. I think it is because you setText in both selectToken: and deselectSelectedToken: methods in TITokenFIeld.m. Actually I wanna use TITokenFIeld to get a receiver select view in the Sparrow.app. It is good but problem is that i can't control the scrolling of the token field view.
Right, but hopefully adding a scrollRectToVisible call when selecting a token should override the behaviour of the editing rect being scrolled into view by the OS. I haven't had a chance to play with it yet, though.
The cause of this is the call [self setText:kTextHidden] in selectToken and [self setText:kTextEmpty] in deselectToken. The good way is to not call those lines and then use self.selectedToken == nil as a flag elsewhere to check for conditions for shouldRemove, etc.
We need kTextEmpty to capture backspaces, but I'll look into replacing kTextHidden.