• 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: Drag and drop between two table views.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag and drop between two table views.


  • Subject: Re: Drag and drop between two table views.
  • From: mmalc Crawford <email@hidden>
  • Date: Thu, 28 Oct 2010 09:25:47 -0700

On Oct 27, 2010, at 8:38 pm, Paul Johnson wrote:

> I took your suggestion to archive the array to a NSData object. I needed to
> implement encodeWithCoder for the object that defines the data for a row
> (containing 3 columns with an NSString in each column). I used the Data
> Modeler to define the row objects and then created the initial declaration
> and implementation files. Now I needed to added encodeWithCoder and
> initWithCoder methods.
>
> Now I'm getting the message "*Failed to call designated initializer on
> NSManagedObject class 'Market'"*
> *when I try to unarchive. I'm really unclear on how to work with Core Data
> in this situation.*
>
Are you trying to use archiving with Core Data? You shouldn't.
When you create a managed object, precisely as the error message states, you need to use its designated initialiser.

What you do to support drag and drop depends on the functionality you want. If you want to copy the objects, then you need to create representations that are not managed objects -- for example a dictionary -- as shown in <http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/05_CopyAndPaste/copyAndPaste.html#//apple_ref/doc/uid/TP40002833-SW1>. If you want to move the objects or otherwise simply create different references to the originals, then you pass the managed object IDs.

mmalc

_______________________________________________

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: 
 >Drag and drop between two table views. (From: Paul Johnson <email@hidden>)
 >Re: Drag and drop between two table views. (From: Graham Cox <email@hidden>)
 >Re: Drag and drop between two table views. (From: Paul Johnson <email@hidden>)
 >Re: Drag and drop between two table views. (From: Graham Cox <email@hidden>)
 >Re: Drag and drop between two table views. (From: Graham Cox <email@hidden>)
 >Re: Drag and drop between two table views. (From: Paul Johnson <email@hidden>)

  • Prev by Date: Re: Custom setter for atomic property
  • Next by Date: Re: NSMomentaryLightButton vs. NSMomentaryPushInButton and NSPushOnPushOffButton vs. NSOnOffButton
  • Previous by thread: Re: Drag and drop between two table views.
  • Next by thread: Move UINavigationBar down?
  • Index(es):
    • Date
    • Thread