[comp.lang.objective-c] Imports with v 4.3

mcintyre@cs.rpi.edu (David McIntyre) (06/19/91)

I have a large Objective-C system, with many classes.  One of the 
classes is named "Label" and is defined and implemented in the files
Label.h and Label.m.  A program which uses this class #imports an
include file which in turn imports all the necessary class files
for the whole system, as well as any other include files needed.
I need to use X label widgets, so I also include the file
<X/Xaw/Label.h>.

In release 4.0, Objective-C took the following:

	#import <X/Xaw/Label.h>
	#import "Label.h"

imported the X header file and then my class definition file.

In release 4.3, the second statement appears to be ignored, I assume
because the preprocessor assumes that two files with the same
name contain the same class definition, even though they are in 
different directories.  I worked-around this (bug/feature) with:

	#include <X/Xaw/Label.h>
	#import "Label.h"

thus not telling the import mechanism about the first Label.h file.

My questions:

1) Is this a bug or feature of 4.3?  

2) Is this an acceptable work around?  Is there some sort of built
in way of doing this without resorting to what I did?

				Thanks, Dave



-- 
 Dave "mr question" McIntyre   +-----+   "....say you're thinking about a plate
 mcintyre@turing.cs.rpi.edu    |  ?  |    of shrimp.....and someone says to
 office : 518-276-8633         +-----+    you 'plate,' or 'shrimp'......"