Cannot find protocol declaration! - MacRumors Forums
Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 23, 2009, 11:00 PM   #1
Duke Leto
macrumors regular
 
Join Date: Mar 2008
Cannot find protocol declaration!

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!!!!
__________________
Gravita - a gravity simulation.
Available for Mac at http://www.thebluekoala.com
Duke Leto is offline   0 Reply With Quote
Old Jun 23, 2009, 11:04 PM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
You need to #import the file where that protocol is defined into the header where you declare your class.
kainjow is offline   0 Reply With Quote
Old Jun 23, 2009, 11:17 PM   #3
Duke Leto
Thread Starter
macrumors regular
 
Join Date: Mar 2008
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.
__________________
Gravita - a gravity simulation.
Available for Mac at http://www.thebluekoala.com
Duke Leto is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Can't find interface declaration cpuin iPhone/iPad Programming 6 Mar 23, 2014 04:08 PM
Instance variable declaration: best practices? MacMan988 iPhone/iPad Programming 1 Jan 26, 2014 07:21 AM
Driver knocks your bumper: protocol? Tsuchiya Community Discussion 24 Dec 4, 2013 01:52 AM
@protocol Branda22 iPhone/iPad Programming 4 Aug 2, 2013 01:50 PM
Resolved: Does Panther (10.3.9) support WPA2/PSK protocol? cytherian Mac Basics and Help 7 Sep 13, 2012 05:57 PM

Forum Jump

All times are GMT -5. The time now is 06:47 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC