iphone - how to fault find if a delegate call is not being picked up in objective-c -


just implementing first delegate in objective-c. thought had in place call addcontroller listcontroller isn't being picked in listcontroller.

given i'm not getting exception, , can see code point in addcontroller calls delegate, there fault finding tips?

so example:

  • given "delegate" call (see below) did not throw exception can assume delegate declarations in same file ok?

    "[delegate newitemcontroller:self didfinishwithsave:yes];"

  • given parent controller speak have delegate specified in *.h definition (see below), implied i've correctly implemented method in *.m file, noting no build errors?

    @interface rootviewcontroller : uitableviewcontroller {

  • is there known way delegate calls go missing without exception if items don't (i.e. if there should check for)

thanks

most common error i've seen delegate method not being called nil delegate property. in other words, forgetting specify delegate is?

as debugging tips, anytime i've seen problem delegate not being called set breakpoints throughout code , step through code. can see things going , or isn't being called.

also, mention exceptions lot. objective c prefers not use exceptions relatively expensive call in language (unlike java). objective c can , use exceptions rare. might want "beaf up" understanding of error handling in objective c.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -