Ah, that makes sense. I knew the @class thing was working, but it was so annoying to never know if the method call was correct or not.

Adding the .h files to the respective .m files fixed the issue though.

Thanks so much!
Andre

On 30-Apr-09, at 11:07 AM, Sherm Pendley wrote:

On Thu, Apr 30, 2009 at 2:55 AM, Andre Doucette <andre.eckythump.douce...@gmail.com > wrote:

It seems that it doesn't like the double #import, but I thought the whole idea behind #import was that it ensured one-time includes.

#import guards against multiple includes, but not circular includes. So you can't have a.h #import b.h, and b.h #import a.h.

If I take either #import "NetworkController.h" or #import "AppController.h" and change them to forward declarations (that is, @class NetworkController; or @class AppController;), this works, but then I get a sprinkling of errors everywhere saying that methods may not be implemented.

You're on the right track, but using @class in your header file is only one of the two necessary steps. The second step is to use #import in your .m files - i.e. in AppController.m, you would #import "NetworkContoller.h", and in NetworkController.m, #import "AppController.h".

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to