On Jul 26, 2009, at 1:04 AM, WT wrote:
Now, I agree that UITextField will run into an infinite loop (in the
sample app) when calling -respondsToSelector on its delegate because
it is its own delegate. However, why is it then that -
textFieldShouldBeginEditing returns successfully and -
textFieldDidBeginEditing executes but doesn't return? Both of them
successfully print their method names:
- (BOOL) textFieldShouldBeginEditing: (UITextField*) text_field
{
NSLog(@"-textFieldShouldBeginEditing:");
return YES;
}
- (void) textFieldDidBeginEditing: (UITextField*) text_field
{
NSLog(@"-textFieldDidBeginEditing:");
}
It would seem that -respondsToSelector: is not being called at all.
Actually, it is and I do get an infinite loop, thanks to
- (BOOL) respondsToSelector: (SEL) selector
{
NSLog(@"-respondsToSelector:");
return [super respondsToSelector: selector];
}
How do I get a string for the name of the method represented by the
selector?
Wagner
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]