On Sat, Feb 27, 2010 at 6:37 PM, Roland King <r...@rols.org> wrote:
> Thanks that's what I see too. That thread doesn't explain why of course. I
> have a trivial test case so I'll file this as a bug and see what comes back
> because I think the behaviour is wrong. For now I'm using a different object
> as delegate, which isn't so neat but works fine.

The thread does explain exactly what's going on in the UITextField
case: it sends itself messages which are also sent to the delegate.

In your case, -[UITextView keyboardInputChangedSelection:] calls [self
textViewDidChangeSelection:], which in turn asks if [self.delegate
respondsToSelector:@selector(textViewDidChangeSelection:)], which
obviously returns YES, so it calls [self.delegate
textViewDidChangeSelection:]. Because self == delegate, you infinitely
recurse.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to