Re: Simple #import question
Re: Simple #import question
- Subject: Re: Simple #import question
- From: Nathan Day <email@hidden>
- Date: Fri, 29 Nov 2002 23:05:23 +1030
Not exactly sure how you have done it, but here are some tip to avoid
problems.
- Within a header file only use import for class you are subclass or
adding a category to, otherwise the import should go in the
implementation file.
- If your header file needs to know about a class type that you have
not imported, then declare it in the header file with @class, you still
need to import it in the implementation file of cause.
On Friday, November 29, 2002, at 10:26 PM, Pete Carss wrote:
I have a project with among others a NSView subclass, and a
MovieEditingController subclass (from the bMoviePallete) - this has
been giving me problems for a few weeks: I want the NSView subclass to
have a reference to the MovieEditingController, so I imported the
header created the instance. The MovieEditingController implementation
file (.m) also imports the header file, as you'd expect, but now
complains that MovieEditingController is an undefined type? What
gives? I thought the #import statement dealt with things like this.
Any clues?
Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.