• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Behavior bind:toObject:withKeyPath:options:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: Colorizing an image
  • Next by Date: Re: C function to a Selector ?
  • Previous by thread: Re: Getting a command key before it is interpreted by the menus
  • Next by thread: Re: Behavior bind:toObject:withKeyPath:options:
  • Index(es):
    • Date
    • Thread