Re: Multi-nib communication
Re: Multi-nib communication
- Subject: Re: Multi-nib communication
- From: Alan Nilsson <email@hidden>
- Date: Fri, 25 Oct 2002 14:49:07 -0700
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.