Re: Cocoa Bindings - removeObserver if I know the observed instance
Re: Cocoa Bindings - removeObserver if I know the observed instance
- Subject: Re: Cocoa Bindings - removeObserver if I know the observed instance
- From: Kay Roepke <email@hidden>
- Date: Thu, 16 Nov 2006 01:40:36 +0100
On 15. Nov 2006, at 23:40 , Mike Abdullah wrote:
The only other real possibility I see (and this is a very bad one)
is to manually search the view hierarchy in the nib looking for an
object that is bound to the observed one.
If this is a common situation (might be a sign of bad design,
though), you (the OP) could post a notification that signal observers
should unbind.
That way you can decouple the process nicely and prevents a
potentially enormous amount of outlets. This might require a
substantial amount of subclassing/custom code, though, if the binding
isn't done through some sort of custom controller.
I imagine the OP asked because the thing thats bound is going to go
away in some manner, right?
cheers,
-k
--
Kay Röpke
http://classdump.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden