Re: Boggled By Bindings
Re: Boggled By Bindings
- Subject: Re: Boggled By Bindings
- From: Scott Stevenson <email@hidden>
- Date: Thu, 30 Sep 2004 16:14:13 -0700
On Sep 30, 2004, at 3:55 PM, Jacob Lukas wrote:
I had the same problem recently. What I found that works is using:
[self addObserver:self forKeyPath:@"arrangedObjects" options:nil context:nil];
in awakeFromNib and
[self removeObserver:self forKeyPath:"];
in dealloc. Then implement:
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if (keyPath == ")
[self didChangeValueForKey:@"ivar"];
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
}
You could probably do the same by just overriding -arrangedObjects and doing the manual change notification in there.
- Scott
--
Tree House Ideas
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]
_______________________________________________
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