• 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, NSArraycontrollers and secondary to-many relationships.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data, NSArraycontrollers and secondary to-many relationships.


  • Subject: Re: Core Data, NSArraycontrollers and secondary to-many relationships.
  • From: Sumanth Peddamatham <email@hidden>
  • Date: Tue, 21 Jul 2009 08:53:16 -0400

Thanks for the hints Steve!

I think my message has been sitting in the Moderator queue, but I was able to figure out @distinctUnionOfArrays a few days ago.

My solution was to create tiered NSArrayControllers. One NSArrayController for the Sessions Entity, a proxy NSArrayController called "Hosts in Session", and another proxy named "Ports in Session".

"Ports in Session" is bound to "Hosts in Session" using a "Content Array" binding of 'email@hidden'.

Of course, my source is available if anyone's having a similar problem.


Best,

Sumanth Peddamatham

On Jul 21, 2009, at 3:09 AM, Steve Steinitz wrote:

Hi Sumanth,

On 20/7/09, Sumanth Peddamatham <email@hidden> wrote:

I've spent a few days playing with NSArrayControllers, fiddling with Content Array, Content Set, Content Object settings; tried understanding @distinctUnionOfSets and @distinctUnionOfArrays; but I've hit a wall.

I've never played with @distinctUnionOfSets nor @distinctUnionOfArrays. I commend you for digging in. And, what a great idea to make a jpeg of your model.


Until someone else gives you a better answer, let me suggest a low- tech technique. Write a method on your Session class that returns the set or array that you want, then bind to that.

Hint 1, if you build a MutableSet you get (object-level) uniqueness for free.
Hint 2, if your Model is in a state of flux, consider using mogenerator for overriding your Model classes.


Cheers,

Steve Steinitz


_______________________________________________

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: 
 >Re: Core Data, NSArraycontrollers and secondary to-many relationships. (From: Steve Steinitz <email@hidden>)

  • Prev by Date: Re: [iPhone] UITableView cell display bugs ?
  • Next by Date: Re: Cocoa Graphics Parsing
  • Previous by thread: Re: Core Data, NSArraycontrollers and secondary to-many relationships.
  • Next by thread: iPhone Question: UIScrollView
  • Index(es):
    • Date
    • Thread