• 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: Cocoa-dev Digest, Vol 2, Issue 878
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 2, Issue 878


  • Subject: Re: Cocoa-dev Digest, Vol 2, Issue 878
  • From: "Ian G. Gillespie" <email@hidden>
  • Date: Fri, 10 Jun 2005 15:34:43 -0400

I have a binary attribute in one of my core data entities called,
"selectionIndexPaths".


Just to be sure, do you mean that in your model you have defined an
attribute, "selectionIndexPaths", as a binary attribute?

This is correct.

In IB I bound a tree controller with this key path to the selection
of an array which contains the entities.  I also used the
NSUnarchiverFromData value transformer in IB.  However, when ever I
save I get this message, "-encodeInt:forKey: only defined for
abstract class.  Define -[NSArchiver encodeInt:forKey:]! "  I am
not sure what this means, where do I need to define it?  I thought
NSIndexPath conformed to the NSCoding protocol?



Oh, that's interesting. A test reveals that NSIndexPath fails with NSArchiver, but succeeds with NSKeyedArchiver...

Rather than using the value transformer in IB, you should define a
transient attribute for the attribute, add a persistent attribute for
the data (e.g. selectionIndexPathsData), and incorporate the
transformation in your accessor method as outline in <http://
developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/
cdNSAttributes.html>

This worked great. Thanks for your help.

_______________________________________________
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


  • Prev by Date: Re: Still can't figure out this overrelease bug
  • Next by Date: Re: Thumbnail from QT Movie?
  • Previous by thread: Re: Still can't figure out this overrelease bug
  • Next by thread: Resizing Columns
  • Index(es):
    • Date
    • Thread