• 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: monitoring changes in a local property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: monitoring changes in a local property


  • Subject: Re: monitoring changes in a local property
  • From: Koen van der Drift <email@hidden>
  • Date: Thu, 10 May 2012 06:54:18 -0400

I'm going to re-read Chapter 31 and 32 of Hillegass' book, which more or less cover this subject (view swapping and core data relations).   Briefly what he does is is adding a MOC property to each view controller, so its views can use that.  I'll post back later.

- Koen.


On May 10, 2012, at 12:39 AM, Quincey Morris wrote:

> On May 9, 2012, at 19:56 , Koen van der Drift wrote:
>
>> In my case, the contentset of the array controller is bound to a tree controller (which is bound to the MOC of my model).   I fail to see how I also bind it to an array.
>
> Well, as to a direct answer, I'm stumped.
>
> If the array controller is in entity mode, AFAICT there's no binding (to the data model) that would let the data model keep track of what's selected via bindings. There simply appears to be no equivalent to the "selectionIndexes" binding when in entity mode.**
>
> So you have 2 choices that I can see:
>
> 1. Shrug and have your view controller monitor the array controller's "selectedObjects" directly.
>
> 2. Have your *app delegate* monitor the array controller's "selectedObjects", and provide the result as a public KVO-compliant property. This would keep the implementation of how the selection is determined as a private detail of the app delegate, preventing the array controller dependency from spreading throughout your application design.
>
>
> ** It's possible that NSArrayController maintains "selectionIndexes" when the content is a NSOrderedSet, in Lion. In that case, you can maintain (via bindings) both a tree "selectionIndexPaths" and an ordered set "selectionIndexes" property in the app delegate, then retrieve the selected "myThings" objects via a two-step lookup process. I wouldn't bet on it working, though.
>
>


_______________________________________________

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

References: 
 >monitoring changes in a local property (From: Koen van der Drift <email@hidden>)
 >Re: monitoring changes in a local property (From: Quincey Morris <email@hidden>)
 >Re: monitoring changes in a local property (From: Koen van der Drift <email@hidden>)
 >Re: monitoring changes in a local property (From: Quincey Morris <email@hidden>)
 >Re: monitoring changes in a local property (From: Koen van der Drift <email@hidden>)
 >Re: monitoring changes in a local property (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: saveDocument:
  • Next by Date: Re: saveDocument:
  • Previous by thread: Re: monitoring changes in a local property
  • Next by thread: [moderator] Reminder - Mac OS X 10.8 beta is under non-disclosure. Do not discuss here.
  • Index(es):
    • Date
    • Thread