Behavior bind:toObject:withKeyPath:options:
Behavior bind:toObject:withKeyPath:options:
- Subject: Behavior bind:toObject:withKeyPath:options:
- From: email@hidden
- Date: Fri, 23 Apr 2004 10:34:08 -0400 (GMT-04:00)
I have started using bind:toObject:withKeyPath:options: in a few places in my code, and I was under the impression that:
[objB bind:@"nameB" toObject:self withKeyPath:@"nameA" options:nil];
would be a two-way link between the objects, i.e. if you modify nameA then the change would propagate to nameB, and viceversa. In reality, the previous call only updates nameB when nameA is changed.
Only by creating the binding in the other direction do I get what I originally expected:
[self bind:@"nameA" toObject:objB withKeyPath:@"nameB" options:nil];
Is this the correct behavior and interpretation of the doc? Any advice against having this use of bindings in one's code?
(I tried searching the usual suspects with no success)
Thanks
Gabe
_______________________________________________
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.