Re: One-way communication from NSPanel in MainMenu.xib to Custom View
Re: One-way communication from NSPanel in MainMenu.xib to Custom View
- Subject: Re: One-way communication from NSPanel in MainMenu.xib to Custom View
- From: Keary Suska <email@hidden>
- Date: Mon, 8 Dec 2008 08:53:24 -0700
On Dec 7, 2008, at 8:05 PM, Gordon Hughes wrote:
I've been pulling my hair out over this for a few days now. I know
I'm not
understanding something quite elementary, so I'd greatly appreciate
any
insights offered.
I'm attempting to write a "game show"-like application. My laptop
would
display a window (the NSPanel) which controls what's going on on a
projected
window. The communication would be strictly one-way from the
controlling
NSPanel (or NSWindow, whatever's more appropriate) to the game board's
window.
My difficulty seems to be with finding a bridge between the two
windows
while still allowing the projected game board to have two different
views.
When I wired the NSPanel and window with a single custom view in
MainMenu.xib through the AppDelegate, it worked. Text entered on the
NSPanel was sent to the custom view with the appropriate button
action.
Other buttons would trigger animations on the projected game board.
When I
added the second view and tried to handle the views with a subclassed
NSViewController, it stopped working.
Am I at least on the right track?
OTOH, sounds like you need NSWindowControllers rather than view
controllers. Since it looks like you have a distinct parent-child
relationship, the "panel" controller can own the "projected"
controller and hence your bridge.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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