Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The problem with bindings



On 30. Jul 2004, at 21:34, Steve Sims wrote:

For example one thing that I wanted to do was react to changes in any key within a "container" object inside my model. Observing for changes in "container" don't work - you need to observe for "container.key1", "container.key2" and "container.key3". This didn't make sense to me, since if "container.key1" changes then logically "container" has changed too by my way of thinking. Which reminds me, I should file an enhancement request on that one.

Not really feasible, e.g.:

id obj = [NSMutableDictionary dictionary];
[array1 addObject:obj]; // ivar
[array2 addObject:obj]; // ivar

[obj setValue:foo forKey:@"bar"];

This should then generate change notifications for both array1 and array2, and since someone may have the object holding the arrays as ivar, another change notification should then be generated for that object a.s.o., so this will cascade beyond control (not to forget that the actual object changed, rarely have back-links to follow for these notifications to be sent).

Regards Allan
--
http://macromates.com/
_______________________________________________
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.


References: 
 >The problem with bindings (From: Drew McCormack <email@hidden>)
 >Re: The problem with bindings (From: Steve Sims <email@hidden>)
 >Re: The problem with bindings (From: Gwynne <email@hidden>)
 >Re: The problem with bindings (From: Steve Sims <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.