Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Headers in Frameworks

Headers in Frameworks
Thread Tools
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Mar 4, 2004, 10:08 AM
 
Apple states that frameworks which provide header files should have a group header which includes all the public stuff, like:

#import <JavaVM/JavaVM.h>

Where JavaVM.h imports:
#import <JavaVM/NSJavaVirtualMachine.h>
#import <JavaVM/NSJavaConfiguration.h>

I understand this convenience, but my problem is what to do with files which need other framework files, E.G.:

[All files in Framework.framework/Headers]

Manager.h
====================
#import <Framework/File.h>

...
====================

File.h
====================
...
====================

Framework.h
====================
#import <Framework/Manager.h>
#import <Framework/File.h>
====================

Is this correct? Do I redundantly import the files, relying on the preprocessor to eliminate duplicates, or should I just import the Manager.h file in the framework header (A real pain in the neck to keep straight)?

Also, how should framework files import other headers in the framework? The only thing I have been able to make work is the style above, but I have had problems with that as well. (I.E., #import "File.h" from Manager.h does not work when using the framework, but works when building the framework.)
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:59 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2