Array operators (was: Custom canRemove binding)
Array operators (was: Custom canRemove binding)
- Subject: Array operators (was: Custom canRemove binding)
- From: Allan Odgaard <email@hidden>
- Date: Thu, 6 May 2004 01:56:15 +0200
On 5. May 2004, at 21:56, Scott Anguish wrote:
[...] bind enabled2 to theArrayController.content.count
Which should probably be: theArrayController.arrangedObjects.@count
Speaking of which (array operators), are these supposed to be KVO
compliant? cause it would seem that they are not, except when the key
path involves an NSArrayController.
E.g. this works:
[arrayController addObserver:self
forKeyPath:@"arrangedObjects.@count" options:0 context:NULL];
Where this gives a run-time error:
id obj = [arrayController arrangedObjects];
[obj addObserver:self forKeyPath:@"@count" options:0 context:NULL];
Which imply that binding to [File's Owner].someArray.@count will also
fail, unless File's Owner (also?) overload addObserver:... -- I hope
I've overlooked something obvious, cause this does not make a lot of
sense to me... ;)
_______________________________________________
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.