On Mar 18, 2013, at 12:15 , Chris Tracewell <ch...@thinkcl.com> wrote:

> I can't really include the parent header in the child window controller as it 
> is included in the parent window controller.

You can, if you need to, since the #import mechanism prevents recursion. 
However, it's unlikely you need to.

Leaving potential complications aside, you can simply to do the following:

        TKProductBuilderWindowController.m should #import MyOwnerController.h
        MyOwnerController.m should #import TKProductBuilderWindowController.h

and neither of the .h files should #import the other.

If either of the .h files has a reference to the other class (for example, if 
TKProductBuilderWindowController.h declares a "myOwner" public property), then 
it's almost always sufficient to put a forward reference such as:

        @class MyOwnerController;

before the declaration that uses it. However, in the scenario you describe, it 
doesn't seem necessary for each class to have a *public* reference to the other 
class, so forward reference likely isn't necessary.

If you have anything more going on, that the above doesn't solve, then you 
should probably post the key parts of the .h files.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to