• 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 Binding question: How to implement unidirectional or read-only binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Binding question: How to implement unidirectional or read-only binding


  • Subject: Re: Core Data Binding question: How to implement unidirectional or read-only binding
  • From: Scott Anguish <email@hidden>
  • Date: Sun, 23 Apr 2006 20:49:24 -0400


On Apr 23, 2006, at 7:32 PM, Peter Bates wrote:

Before I do things the hard way, just thought I'd ask of those more experienced in the core data and bindings worlds if there might be an easy way around this problem:

This isn't a Core Data related question and you used it in the subject. I happen to know this drives mmalc bananas.. :-) Good on you.



I have a core data application in which a comboBox is bound to two array controllers. The combo boxes' content is bound to the controller A arrangedObjects, the contentValue is bound to controller A arrangedObjects.name key, and the value is bound to arrayController B's selection.name. The problem is that I'm allowing the user to enter a partial name in the comboBox and using a delegate method to fetch matching names, setting the fetched array as the comboBoxes' arrayController A's content.


The hitch is that the partial name typed by the user is propagated back to the object. I think what I really need here is a unidirectional or read only binding.

not really. Read-only bindings aren't editable. If you change the value in the model, that change is reflected in the UI.


Otherwise I'll probably have to construct a parallel array based on the fetched data and use the parallel array as the arrayController's content. I have a feeling this would be picking the hard and error prone way to accomplish the desired end. I'll appreciate any advice. I've been picking through the documentation, searching the archives etc., but haven't yet recognized the answer if it's there.

that's how I'd do it. I've done this before using the KVC operators to generate a unique array containing only the distinct names. BUT, it causes a cascade of KVO updates as the data is loaded and makes load times excessive. that's why I went to the other method.



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Core Data Binding question: How to implement unidirectional or read-only binding
      • From: mmalcolm crawford <email@hidden>
    • Re: Core Data Binding question: How to implement unidirectional or read-only binding
      • From: Peter Bates <email@hidden>
References: 
 >Core Data Binding question: How to implement unidirectional or read-only binding (From: Peter Bates <email@hidden>)

  • Prev by Date: Re: How do I implement a splash window
  • Next by Date: Re: Keyboard Events in Modal NSWindow (Part 2)
  • Previous by thread: Core Data Binding question: How to implement unidirectional or read-only binding
  • Next by thread: Re: Core Data Binding question: How to implement unidirectional or read-only binding
  • Index(es):
    • Date
    • Thread