advertisement

Article:
  Working With Bitmap Images; Document-Based Application Redux
Subject:   @class IAImageView supplemented by *,h
Date:   2002-04-26 04:28:14
From:   michele
Response to: @class IAImageView supplemented by *,h

Hello sheldon,


For what I've understood from practise:


1 - Don't use #include at all while coding in Cocoa.


2 - Use #import:


- in implementation files:
- for the proper header,
- for other headers, when you've used the corresponding @class methods in the header file, and when there is some code which uses variables or calls to methods from thoses classes


- in header file, when your your header file uses static variables defined in other class.


3 - use @class in header files n other situations, in this case don't forget to #import the corresponding header in the implementation file if needed.


Best way to determine what to #import or @class:


don't include anything and build your code, adding #import or @class step by step, rebuilding after each addition, and soon you'll discover what to do in each case, though some cases might be not so obvious.


Michele




1 to 1 of 1
  1. thank you
    2002-04-26 08:32:31  psheldon [View]

1 to 1 of 1