• 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
RE: design problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: design problem


  • Subject: RE: design problem
  • From: "Salter, Adam Q" <email@hidden>
  • Date: Thu, 14 Feb 2002 13:29:20 +1100

> I have a header file interdependency. A.h imports B.h and B.h imports
> A.h. Of course, that is not possible, so I am using @class A.
> The other
> way around is to use id, however that would add overhead, and I don't
> want that (since there is a more elegant way of doing it).

As I understand it #import will only import the file if it has not already
been imported, so putting #import "A.h" at the top of B.h and #import "B.h"
at the top of A.h should not result in an infinite loop of A importing B
importing A.

Could be wrong since I haven't tried it ;-)

Adam
>
> I get a bunch of warnings because the compiler can not find the
> selectors (apparently since one of the header file is not
> imported). Is
> there any way to tell the compiler of the existence of those
> selectors?
> An alternative to @class. This is really not all that important, the
> program runs great, however I hate getting 50 warnings.
>
> Nick
>
> No, I don't use -ansi -pedantic. :)
> _______________________________________________
> cocoa-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: design problem
      • From: Andy <email@hidden>
  • Prev by Date: Re: multiple nibs question
  • Next by Date: Re: design problem
  • Previous by thread: Re: design problem
  • Next by thread: Re: design problem
  • Index(es):
    • Date
    • Thread