• 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: CoreData and arrays owned by arrays...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData and arrays owned by arrays...


  • Subject: Re: CoreData and arrays owned by arrays...
  • From: Scott Ahten <email@hidden>
  • Date: Wed, 18 May 2005 13:57:50 -0400

I had a similar problem while attempting to bind a table view column to aggregated values of related objects using a compound key path such as "email@hidden". The error message was very similar.

[<_NSFaultingMutableSet 0x343540> addObserver:forKeyPath:options:context:] is not supported. Key path: @sum.hours

It appears that the FaultingMutableSet fails to be faulted into actual data before evaluating bindings defined in Interface Builder. However, once the fault is fired, the path is evaluated correctly and the column displays the sum of the related intervals. ( bug filed as radar://3950029 )

In my particular case, I ended up creating a NSManagedObject subclass with an accessor to return the data programmatically and bound the table column to that property instead.

- (NSNumber *)totalHours {

    return [self valueForKeyPath:@"email@hidden"];

}

- Scott


On May 18, 2005, at 2:46 AM, Lee Morgan wrote:

On May 17, 2005, at 11:21 PM, Lee Morgan wrote:


So you see, what I'm needing is the segregation of sub item arrays per master item (or at least a GUI segregation). Then the ability to have a pop up menu cell show it's corresponding master item's sub item's names. With the selected sub item object bound to the masterArray.properties.selectedSubItem so that I know which one the user has selected at any given time.


To try and clear that up a little better...
As I said, my CoreData Model has a "master item" entity that has a to-many relationship to a "sub item" entity. The sub item entity in turn has a to-one relationship to the master item entity.
This creates the 'array owned by array' style I was using before (well at least it does once the relationships are set as needed, but thats beside the point).
What I'm looking to do is display a table which has a list of master items (got this part working). Within this table there is a pop up menu item column, which it's contentValues *should* be bound to something like this...
masterListArrayController.arrangedObjects.subItems.displayName
and it's selected object *should* be bound to something along the lines of this...
masterListArrayController.arrangedObjects.selectedSubItem


I say *should* because I can't find any way to bind this relationship as needed.
Setting it as stated gives the following error:
[<_NSFaultingMutableSet 0x3e5a60> addObserver:forKeyPath:options:context:] is not supported. Key path: name


- lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40pixelfreak.net


This email sent to email@hidden




- - - :: email@hidden :: http://www.pixelfreak.net - - -

_______________________________________________
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: CoreData and arrays owned by arrays...
      • From: Lee Morgan <email@hidden>
References: 
 >CoreData and arrays owned by arrays... (From: Lee Morgan <email@hidden>)
 >Re: CoreData and arrays owned by arrays... (From: mmalcolm crawford <email@hidden>)
 >Re: CoreData and arrays owned by arrays... (From: Lee Morgan <email@hidden>)
 >Re: CoreData and arrays owned by arrays... (From: Lee Morgan <email@hidden>)

  • Prev by Date: Re: CoreData and arrays owned by arrays...
  • Next by Date: Re: Why use protocols?
  • Previous by thread: Re: CoreData and arrays owned by arrays...
  • Next by thread: Re: CoreData and arrays owned by arrays...
  • Index(es):
    • Date
    • Thread