Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Create a truly transparent Activity Monitor Dock icon' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a truly transparent Activity Monitor Dock icon
Authored by: dfe on Aug 13, '07 09:34:03AM

It is true that you can use #import <Cocoa/Cocoa.h> in preference to including needed headers separately. If you have a large project with many source files this makes sense as you can put that import in your prefix header and precompile it.

When you have only one source file there is no advantage to using precompiled headers and including every Cocoa header forces the compiler to parse an awful lot of code that will never be used. Therefore, when writing small programs that live in only one source file my preference is to import only the needed headers.



[ Reply to This | # ]