Parent-Child References
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