• 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 and @count keypath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data and @count keypath


  • Subject: Re: Core Data and @count keypath
  • From: GbT <email@hidden>
  • Date: Wed, 8 Feb 2006 10:04:29 +0100

Thanks. Now it works perfectly.
Anyway I'd like to display the count in the same way Mail does for
every folder ... with a grey circle and the number of unread items
inside... I have to put it in a nstablecolumn... should I subclass
NSTableColumn or what is the best way to do this?

2006/2/7, John R. Timmer <email@hidden>:
> You have to bind to a value that's read/write.  @count is read only.
> If you need to bind to it, make a managed object key like arrayCount
> that returns the count in the getter method, and does nothing in the
> setter method.
>
> JT
>
> On Feb 7, 2006, at 2:14 AM, GbT wrote:
>
> > Hi,
> > I have a core data app with some entities, the entity A has a to-many
> > relationship with another entity B. I use an nstreecontroller for A
> > and want to display the number of records for the relationship A-->>B,
> > but if I put relationshipToB.@count in the model key path in the
> > bindings I obtain this message:
> >
> > *** NSRunLoop ignoring exception '[<_NSFaultingMutableSet 0x3c5d30>
> > addObserver:forKeyPath:options:context:] is not supported. Key path:
> > @count' that raised during posting of delayed perform with target
> > 37e980 and selector 'open:'
> >
> > The selector open is related to the drawer... but the addObserver
> > thing isn't clear to me...
> > My entities are all subclassed by NSManagedObject.
>
> ____________________________________
> Science writer, Ars Technica (among other things)
> http://arstechnica.com/journals/science.ars
>
>
>
>
 _______________________________________________
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: Core Data and @count keypath
      • From: Chris Hanson <email@hidden>
References: 
 >Core Data and @count keypath (From: GbT <email@hidden>)
 >Re: Core Data and @count keypath (From: "John R. Timmer" <email@hidden>)

  • Prev by Date: Re: Crash when color well panel is open
  • Next by Date: Re: replacing a part of the image with other image
  • Previous by thread: Re: Core Data and @count keypath
  • Next by thread: Re: Core Data and @count keypath
  • Index(es):
    • Date
    • Thread