Cannot find protocol declaration!

Discussion in 'Mac Programming' started by Duke Leto, Jun 23, 2009.

  1. macrumors regular

    Joined:
    Mar 17, 2008
    #1
    I made a delegate for a custom class, and I used a formal protocol declaration. However, when I make a class conform to that protocol, I get an error that the declaration was not found, and it is there!!!!
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    You need to #import the file where that protocol is defined into the header where you declare your class.
     
  3. thread starter macrumors regular

    Joined:
    Mar 17, 2008
    #3
    Well, after looking at my #import statements, I realized that the problem was a strange import loop, where I should have used @class. Thanks for pointing me in the right direction!

    It's funny how problems seem so much simpler here.
    :D
     

Share This Page