Re: UITextView as its own delegate - infinite loop on keyboard select
Re: UITextView as its own delegate - infinite loop on keyboard select
- Subject: Re: UITextView as its own delegate - infinite loop on keyboard select
- From: Roland King <email@hidden>
- Date: Sun, 28 Feb 2010 10:55:53 +0800
Oh and one other point after reading that whole thread (on an iPhone
that's surprisingly hard!), the application does infinite loop but it
doesn't recurse, so I do not believe the suggestion in the middle of
that thread that respondsToSelector: checks self and then the delegate
(which is itself in this case) and thus recurses, is correct. The
stack depth stays the same and the respondsToSelector calls alternate.
Nor do I think that's the delegate pattern either, if it were I'd just
have to implement the delegate method in my subclass but not make it
it's own delegate and it would work, but it doesn't. Wish it did tho,
that would be a useful pattern sometimes and I'd be able to still
chain the real delegate later if I wanted.
On 28-Feb-2010, at 10:37, Roland King <email@hidden> wrote:
On 28-Feb-2010, at 9:21, Kyle Sluder <email@hidden> wrote:
Do not make a UITextView its own delegate.
More information here:
http://lists.apple.com/archives/Cocoa-dev/2009/Jul/msg01406.html
--Kyle Sluder
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._______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden