Re: Boggled By Bindings
Re: Boggled By Bindings
- Subject: Re: Boggled By Bindings
- From: Patrick Machielse <email@hidden>
- Date: Mon, 04 Oct 2004 13:56:13 +0200
op 01-10-2004 23:38 schreef Scott Stevenson
>
On Oct 1, 2004, at 4:26 AM, Patrick Machielse wrote:
>
>
> Also, this is something I don't yet grasp of the Controller architecture. Out
>
> of the box NSArrayController returns _NO_ to
>
>
>
> [NSArrayController
>
> automaticallyNotifiesObserversForKey:@"arrangedObjects"];
>
>
>
> Yet, I can successfully bind to 'arrangedObjects' and get notified of any
>
> change. So observing and binding suddenly seem unrelated concepts. I still
>
> haven't wrapped my head around this...
>
>
KVO and KVB are very much related to each other.
Yes, that is my understanding of the technology as well.
>
My guess is that NSArrayController does manual notifications internally
>
when the situation requires it. This might be a optimization strategy.
I have two questions left regarding the NSArrayController
(1)
Why is is that automaticallyNotifiesObserversForKey:@"arrangedObjects"
returns NO, but I can still successfully bind to 'arrangedObjects'?
(2)
Why does
+ (void)initialize
{
[[self class] setKeys:[NSArray arrayWithObject:@"arrangedObjects"]
triggerChangeNotificationsForDependentKey:@"myKey"];
}
not work, _even_ when I override
+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key;
to return YES for 'arrangedObjects'?
Can any of you bindings-experts clarify this, or should I file a bug report?
Patrick
---
Hieper Software
w: www.hieper.nl
e: email@hidden
_______________________________________________
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