Re: Subclass Import Issues
Re: Subclass Import Issues
- Subject: Re: Subclass Import Issues
- From: Ilan Volow <email@hidden>
- Date: Fri, 31 Dec 2004 02:50:07 -0500
For the edification of anyone searching the list archives in the
future, I found out the problem was that in Child.m I was importing
Child.h before Parent.h--silly me. Once I switched the imports around
everything worked (I was already using @class in the .h files and doing
the imports in the .m files, but @class got snipped out when I cut and
pasted the example).
Thanks to everyone for the suggestions, anyways.
On Dec 30, 2004, at 11:13 PM, Ilan Volow wrote:
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
--
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