Circular references
Circular references
- Subject: Circular references
- From: DKJ <email@hidden>
- Date: Sun, 13 Sep 2009 15:00:57 -0700
I've got a MyViewController and a bunch of MySubview objects that are
subviews of its view. I want MyViewController to keep track of certain
things, such as the last MySubview that was clicked. So MySubview has
to know about MyViewController to tell it it's been clicked; and
MyViewController has to know about MySubview to define the property
for the last-clicked subview.
But if I put this in MySubview.h:
#import "MyViewController.h"
and this in MyViewController.h:
#import "MySubview.h"
I get errors.
What's a good way to deal with this situation?
I know this must be a very basic question, but I don't even know what
terms I should google to find out about it.
dkj
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden