Re: Document App: IB connections 101
Re: Document App: IB connections 101
- Subject: Re: Document App: IB connections 101
- From: Ondra Cada <email@hidden>
- Date: Tue, 23 Jul 2002 20:30:16 +0200
On Tuesday, July 23, 2002, at 05:03 , Michael Willhide wrote:
Can anyone offer a thought as to the best way to connect an instance
associated with a documnet (created in the MyDocument.nib) to a unique
instance of another class that exists in the application? IE: How
would
I
go about making a connection between a view in a document window, and a
"global" tool manager associated with an application tool bar or
something?
Generally, you use First Responder instead of a direct connection in
these
cases.
Could you explain how you would go about doing that? When I click on my
custom view, then it usually is the first responder right? Then how
would I get an action to the "global" tool manager?
Place the shared thing somewhere low to the responder chain -- like as an
NSApp delegate, or so. Then, from anywhere, just send a message which it
understands (and which views and other controllers do not understand) up
to the responder chain; it would eventually get there.
Of course, depending on your actual needs, there might be better ways --
like using notifications (see NSNotification/Center/Queue). Or perhaps
even a programmatically-made direct connection, though I somewhat doubt it
would be the best way.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.