Skip navigation.
 
mlRe: Communications between multiple NIB's
FROM : Sherm Pendley
DATE : Mon Mar 24 17:11:04 2008

On Mon, Mar 24, 2008 at 12:02 PM, Lincoln Green <isildur.<email_removed>>
wrote:

> Alright, I have been searching archives, following tutorials, and
> looking at source code for several hours, and I cannot figure out the
> answer to my problem.
>
> Is there a way to programmatically connect to a NIB file and read it's
> outlets without changing my File's Owner? I have a color well in one
> NIB (My Prefs NIB) and a window in another. I want the color well to
> change the window's background. I have an action called setColor:, but
> I cannot figure out how to access the window outlet from the NIB
> containing the window. Please help!



Connect the action to the First Responder, which will route it through the
responder chain. One of the objects in the responder chain is the key
window.

    <
http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/chapter_2_section_6.html
>


Or, since this is a prefpane we're talking about here, you could use Cocoa
Bindings to connect the color setting to the shared user defaults
controller, in both nibs. When a bound setting is changed in the prefpane,
anything else that's also bound to it is automagically notified of the
change.

    <
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/CocoaBindings.html
>


sherm--

Related mailsAuthorDate
mlCommunications between multiple NIB's Lincoln Green Mar 24, 17:02
mlRe: Communications between multiple NIB's Cathy Shive Mar 24, 17:06
mlRe: Communications between multiple NIB's Sherm Pendley Mar 24, 17:11
mlRe: Communications between multiple NIB's Jonathan Hess Mar 24, 20:37
mlRe: Communications between multiple NIB's Bertil Holmberg Mar 24, 22:39
mlRe: Communications between multiple NIB's Gerd Knops Mar 24, 23:27
mlRe: Communications between multiple NIB's Steve Weller Mar 25, 01:58
mlRe: Communications between multiple NIB's Lincoln Green Mar 28, 19:27
mlRe: Communications between multiple NIB's Steve Weller Mar 29, 16:31