Re: Info window scenario
Re: Info window scenario
- Subject: Re: Info window scenario
- From: "Erik M. Buck" <email@hidden>
- Date: Tue, 6 Nov 2001 09:47:21 -0600
The solution is the responder chain. Send state changing messages up the
responder chain.
Even if you want the "current" document directly, you don't need to keep
track yourself. NSDocument controller already knows the "current" document.
>
and if so, doing [[InfoController sharedInfo]
>
setCurrentDocument:theDoc]. then, the apply button
>
can work because i have a reference to the current
>
document.
>
>
this feels like a total hack. there has to be a
>
better way of doing this. i know this is common
>
thing to do (and i've done it when it's not a
>
document based app), but it seems like there's no
>
clear way to accomplish this. the only thing i can
>
think of is posting a notification that contains a
>
reference to the InfoController class to let all
>
documents know that the preferences changed, but
>
this is not clean and feels like bad design. i'm
>
open to any suggestions. if more details are
>
needed, i'm more than happy to give them. thanks
>
in advance to anyone who can help!!!