• 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
Newbie #import confusion...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie #import confusion...


  • Subject: Newbie #import confusion...
  • From: Matt Reagan <email@hidden>
  • Date: Wed, 28 Dec 2005 02:27:45 -0800

Can anyone please help me out? The answer to this is so amazingly
simple that I can't seem to find it anywhere...

I have a controller object with an outlet pointing to a NSView
subclass, and that NSView has an outlet pointing back to the
controller. My problem is that because the IBOutlet declartions are
typed to these specific classes, I have to #import each header so the
compiler can see what it needs to compile, but I'm getting some kind
of circular problem where the NSView's source imports the controller's
header, which in turn imports the view's header, and round and round
it goes. So I get a compile error. In the NSView's source code,
changing this declaration:

IBOutlet myCustomView *theView;

to this:

IBOutlet id *theView;

will allow it to compile, but obviously there must be some way to
avoid this problem without having to get rid of the class typing.

Can someone shove my nose into the obvious solution for this?

Thank you all for your help,
-matt
_______________________________________________
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: Newbie #import confusion...
      • From: email@hidden
    • Re: Newbie #import confusion...
      • From: mmalcolm crawford <email@hidden>
    • Re: Newbie #import confusion...
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Agent Applications and launchd
  • Next by Date: Re: Open a window created in another nib
  • Previous by thread: Re: [fixed] Open a window created in another nib
  • Next by thread: Re: Newbie #import confusion...
  • Index(es):
    • Date
    • Thread