• 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
array controllers and key paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

array controllers and key paths


  • Subject: array controllers and key paths
  • From: Amy Heavey <email@hidden>
  • Date: Tue, 1 Feb 2011 07:33:24 +0000

Hi,

I've got 3 entities, Event, CustomerOrders and CustomerORderITems.

Events has a to many relationship (eventOrders) to CustomerOrders
CustomerOrders has a to many relationship (customerOrderItems) to CustomerOrderItems


I'd like to be able to list all of the CustomerOrderItems for a selected event in a table.

I think I need to create a new array controller (eventOrderItems) but how do I bind the content? I've tried various array/set key paths but none have worked so far. Is this possible?

I've got an array controller called eventOrders which is bound to the Events.selection so I thought I could bind eventOrderItems to eventOrders.arrangedObjects keypath customerOrderItems

If I try to bind the content set I get an error saying something like cannot create content set, try using content array,
Cannot create NSSet from object (
) of class NSCFArray - consider using contentArray binding instead of contentSet binding


but if I try that I get another error
[<_NSFaultingMutableSet 0x1a0a90> addObserver:forKeyPath:options:context:] is not supported. Key path: orderItemProduct.productTitle




Many Thanks

Amy



_______________________________________________

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


  • Prev by Date: Re: NSTableView selecting text within a cell [SOLUTION]
  • Previous by thread: -[CALayer setContents:] slower in iOS 4.2?
  • Index(es):
    • Date
    • Thread