• 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
Re: How can modal window pass messages to its parent window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can modal window pass messages to its parent window?


  • Subject: Re: How can modal window pass messages to its parent window?
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 18 Mar 2013 13:42:06 -0700

On Mar 18, 2013, at 12:15 , Chris Tracewell <email@hidden> 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 (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

References: 
 >How can modal window pass messages to its parent window? (From: Chris Tracewell <email@hidden>)

  • Prev by Date: Re: How can modal window pass messages to its parent window?
  • Next by Date: Re: Global (all-user) preferences for an application
  • Previous by thread: Re: How can modal window pass messages to its parent window?
  • Next by thread: Re: How can modal window pass messages to its parent window?
  • Index(es):
    • Date
    • Thread