Re: Controller introspection API
Re: Controller introspection API
- Subject: Re: Controller introspection API
- From: Allan Odgaard <email@hidden>
- Date: Mon, 1 Mar 2004 09:33:09 +0100
On 1. Mar 2004, at 9:03, Scott Anguish wrote:
No there is not, because the object being observed should *not* have
intimate knowledge of its observers.
I don't think that's what he was asking.
What then was he asking? Maybe the OP could clarify? or state what he
wants to accomplish.
The NSTableView subclass may have a legitimate need to determine what
the content binding is, maybe to send a message to it. This isn't
crossing any encapsulation bounds.
I had it mixed up in my head -- i.e. I saw the controller as observing
the table view when in fact it is the table view which observes the
controller. Although "binding" really is having both objects observe
each other (through a mediator).
Generally, if you want to "communicate" to your observer, you just add
another key for the object to observe (that also solves the problem of
testing for no observers or having many observers).
_______________________________________________
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.