• 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: Wed, 09 May 2012 21:48:17 -0400

On May 8, 2012, at 12:27 AM, Quincey Morris wrote:

> P.S. Personally, I wouldn't bind to a NSArrayController like this, because it just obscures the MVC lines of your app. The array controller is getting its content from somewhere: from this view controller itself, from a window controller, or from the app delegate. Assuming the last of these (based on your description of the data as app-wide), then I'd give the app delegate a "selectionIndexes" property (of type NSIndexSet*), bind the array controller's "selectionIndexes" binding to this property in IB, and have the view controller observe the app delegate "selectionIndexes" property instead of the array controller "selectedObjects" property.
>
> The rationale for this is that the array controller is merely a glue object foisted on you by the bindings UI conventions, and the less your code needs to know about it the better.


Hmmm, an indexset just gives me an index, how do I get the object from it that it belongs to? I think I still need to be able to access the NSArrayController (that feeds the NSTableView) for that?

Did I miss something?

- Koen.




_______________________________________________

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: monitoring changes in a local property
      • From: Quincey Morris <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>)

  • Prev by Date: Re: crashes loading saved file
  • Next by Date: Re: crashes loading saved file
  • Previous by thread: Re: monitoring changes in a local property
  • Next by thread: Re: monitoring changes in a local property
  • Index(es):
    • Date
    • Thread