• 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
Parent-Child References
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parent-Child References


  • Subject: Parent-Child References
  • From: Jason Barker <email@hidden>
  • Date: Fri, 14 Apr 2006 18:55:49 -0600

I have a subclass of NSView (myView) with an NSMutableArray (myArray) of objects (myObject). When an instance of myObject is created, I want to assign it a pointer to myView. But when I put the '#import' statement in myObject's header file and declare a variable of type myView in myObject's header file and compile it, I get an error that says: error: parse error before "myObject" (which error is generated in the subclass of NSView). If I remove the #import statement and change the data type of the instance of myView to simply NSView (i.e. NSView *aView;), the project compiles just fine. Is there a problem with this circular referencing scenario that the compiler won't allow it?


Thanks, Jason (newbie) _______________________________________________ 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: Parent-Child References
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: CoreData faulting - does it rely on #self?
  • Next by Date: Re: CoreData faulting - does it rely on #self?
  • Previous by thread: NSSlider and timers
  • Next by thread: Re: Parent-Child References
  • Index(es):
    • Date
    • Thread