Subclass Import Issues
Subclass Import Issues
- Subject: Subclass Import Issues
- From: Ilan Volow <email@hidden>
- Date: Thu, 30 Dec 2004 23:13:01 -0500
I'm having a problem with an import that's really knocking me for a
loop.
To simply things, I'll say I have two classes: Parent and Child. Not
only is Parent the superclass of Child, but it also contains an
instance of Child.
The .h files look like this
--Parent.h
#import "Child.h"
@interface Parent
{
Child *myChild;
}
--Child.h
#import "Parent.h"
@interface Child : Parent
{
}
When I try building the thing, I get various parse errors because of (I
believe) recursive imports. I've tried the standard way of getting
around recursive importing problems by using the @class thing in the .h
file and then doing the import in the .m file, and that doesn't seems
to work in this case.
While I would agree with anyone that this problem is really hinting at
a redesign, I'm following someone else's spec and I don't have much
choice in the matter. So if anyone would have any suggestions about how
I could get around this, it would be much appreciated.
--
Ilan Volow
Ergonomica Auctorita Illico!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden