• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Subclass Import Issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Subclass Import Issues
      • From: Ilan Volow <email@hidden>
    • Re: Subclass Import Issues
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: multiple declarations for method `length' ?
  • Next by Date: Is it possible to draw text to an offscreen view that has no window?
  • Previous by thread: Re: Displaying Swedish Characters?
  • Next by thread: Re: Subclass Import Issues
  • Index(es):
    • Date
    • Thread