• 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: Sub-classing NSAtomicStore
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sub-classing NSAtomicStore


  • Subject: Re: Sub-classing NSAtomicStore
  • From: "Melissa J. Turner" <email@hidden>
  • Date: Tue, 8 Jul 2008 12:48:15 -0700

Todd -

I'd suspect one of two things:

1) Your store's metadata method isn't returning the same identifier (ie @"AtomicStore") you're passing to addPersistentStore, so the coordinator thinks the store isn't what the caller of addPersistentStore said it would be
2) Your store's metadata method is returning nil, and the coordinator thinks it isn't actually a store


See the documentation at

http://developer.apple.com/documentation/Cocoa/Conceptual/AtomicStore_Concepts/Articles/asLifecycle.html#//apple_ref/doc/uid/TP40004527-SW1

for what needs to happen when in order to avoid a confused coordinator. The key detail is: "You must also initialize the metadata for the store. After initWithCoordinator:configurationName:url:options:, the coordinator invokes metadata on the new store; at this point the metadata must be correct."

+Melissa


On Jul 7, 2008, at 13:11, Todd Stanley wrote:

Hi All,

Has any one had any luck working with the AutomicStoreSubclass example. I
need to manage and AtomicStore and thought that I would be able to use the
AutomicStoreSubclass example as a road-map. When I
addPersistentStoreWithType as follows -


   if ([coordinator addPersistentStoreWithType:@"AtomicStore"
configuration:nil URL:url options:storeOptionsDict error:&error])

I get the following error -

Error Domain=NSCocoaErrorDomain Code=134010 UserInfo=0x162240 "The store
type is inconsistent with the data format."


Anyone know of any gotchas when subclassing NSAtomicStore?

Todd
_______________________________________________

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

_______________________________________________

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: 
 >Sub-classing NSAtomicStore (From: "Todd Stanley" <email@hidden>)

  • Prev by Date: Re: problem with IKImageView and filters
  • Next by Date: Re: controlling system muting ?
  • Previous by thread: Sub-classing NSAtomicStore
  • Next by thread: Releasing objects causes BAD_ACCESS
  • Index(es):
    • Date
    • Thread