« Errors: SQLite3 Database Doesn't Remain Updated | Main | Table Tricks & Tips, Part One: The ContentView »

April 06, 2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a010535e1becf970c01156ff4d011970b

Listed below are links to weblogs that reference Create Delegate Protocols for the iPhone:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Ries van twisk

Instead of crashing with required delegate, would it not be better to log it using NSLog or similar methods?

Ries

Shannon Appelcline

Not included a required delegate is fundamentally a programming error, not a runtime error, so I'm not convinced you need to be very polite about it. However, including an NSLog (before you error out) might help a programmer with debugging, so if you're making something for more public consumption, I don't see why not.

Paul Franceus

No need to check self.delegate for null before calling -respondsToSelector:
Messages to nil do not cause errors in Cocoa. The resulting code is cleaner, and more idiomatic.

mariot

Nice article. But what will happen if I try to subclass an object (i.e. UIScrollView) that already has its own delegate? How can I make sure that the subclass' delegate will still contain its parent class' delegate?

iphone trend

great article. good luck for all

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment