• 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: Multi-nib communication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-nib communication


  • Subject: Re: Multi-nib communication
  • From: Jan Van Boghout <email@hidden>
  • Date: Fri, 25 Oct 2002 23:55:11 +0200

Thank for the reply, but about 1 minute after I sent the mail I found out about the SimpleMultiWindow example which is exactly what I need. Typical that I find it right after the mail

But thanks a lot anyway :)

Jan VB


on 10/25/02 2:14 PM, Jan Van Boghout at email@hidden wrote:

Hello everyone,

Let's say I have two windows and two controllers. Window1 and
controller1 are in nib1. Window2 and controller2 are in nib2. A button
in window1 wants to tell window2 to open/close/resize/whatever. Now my
problem is: how do I do this best? I need some way for the two
controllers to communicate with each other.

How about using notifications. Window2 tells the default notification
center it wants to hear about messages called "Window1WantsWindow2ToChange".

Then when Window1 wants Window2 to change, it posts a message to the default
notification center called "Window1WantsWindow2ToChange". The notification
center then tells Window2 that it has a message it is interested in.

You can pass a dictionary in a message too if you want to pass data from
Window1 to Window2.

Alan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Multi-nib communication (From: Alan Nilsson <email@hidden>)

  • Prev by Date: Re: Multi-nib communication
  • Next by Date: Re: Security framework refuses to work at all
  • Previous by thread: Re: Multi-nib communication
  • Next by thread: [Q] CGX... errors
  • Index(es):
    • Date
    • Thread