Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple #import question



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.

References: 
 >Simple #import question (From: Pete Carss <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.