• 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
Re: Core Data faulting and bindings: recursive KVO notifications?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data faulting and bindings: recursive KVO notifications?


  • Subject: Re: Core Data faulting and bindings: recursive KVO notifications?
  • From: Ron Lue-Sang <email@hidden>
  • Date: Fri, 28 Mar 2008 22:29:11 -0700


On Mar 28, 2008, at 10:08 PM, Ben Trumbull wrote:

Binding to .selection.a is going to call -valueForKeyPath:@"a" on the array that's selected, which is 10,000 objects. Since the text field can only show one of those values, this is kinda pointless. This is the source of the recursion. Selection is based on the entire array, which doesn't play well with KVO notifications during faulting.

If you go into the Text Field's binding (cmd-4) and disable "Allows Editing Multiple Values Selection" then the detail fields go blank with multiple selections, but work as expected with a single selection.

There's also the controller attribute "Always Use Multi Value Marker" which will keep the controller from even looking at the property values of the selected objects as long as more than one object is selected in the controller.


Of course, this won't help if your textfield is editable and bound to the controller's selection.foo keypath and the user tries to edit the value.



And cmd-a is instantaneous, even without any of the other workarounds we've discussed.

I'll file a bug if the issue is determined to be not on my part.

Please file a bug and attach your sample.

- Ben


-----------------------------
Ronzilla
Core Bindings/Cocoa Builder/Interface Data



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Core Data faulting and bindings: recursive KVO notifications?
      • From: Dennis Lorson <email@hidden>
References: 
 >re: Core Data faulting and bindings: recursive KVO notifications? (From: Ben Trumbull <email@hidden>)
 >Re: Core Data faulting and bindings: recursive KVO notifications? (From: Dennis Lorson <email@hidden>)
 >Re: Core Data faulting and bindings: recursive KVO notifications? (From: Ben Trumbull <email@hidden>)

  • Prev by Date: Re: Core Data faulting and bindings: recursive KVO notifications?
  • Next by Date: Re: Core Data and NSOperation
  • Previous by thread: Re: Core Data faulting and bindings: recursive KVO notifications?
  • Next by thread: Re: Core Data faulting and bindings: recursive KVO notifications?
  • Index(es):
    • Date
    • Thread