• 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: What would cause persistentStoreForURL: to return nil?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What would cause persistentStoreForURL: to return nil?


  • Subject: Re: What would cause persistentStoreForURL: to return nil?
  • From: Mike Abdullah <email@hidden>
  • Date: Fri, 12 Mar 2010 17:09:41 +0000

On 12 Mar 2010, at 16:48, Gideon King wrote:

> Ah, I think I had a fundamental misunderstanding - I thought it would load the store, but it only returns it if it's already loaded in the coordinator.
>
> The documentation gives no clue of this - all it says is:
> Parameters
> URL
> An URL object that specifies the location of a persistent store.
>
> Return Value
> The persistent store at the location specified by URL.
>
>
> I think it would be very easy to assume (as I did) that it would load it from the URL provided.

I think the use of "for" is supposed to be your hint there. Cocoa uses it almost universally to mean that the returned object is already present and that you're doing nothing more than a lookup.

-persistentStoreWithURL: would be more like you expected I think._______________________________________________

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: 
 >What would cause persistentStoreForURL: to return nil? (From: Gideon King <email@hidden>)
 >Re: What would cause persistentStoreForURL: to return nil? (From: Mike Abdullah <email@hidden>)
 >Re: What would cause persistentStoreForURL: to return nil? (From: Gideon King <email@hidden>)

  • Prev by Date: Re: Use of KVC Array operators
  • Next by Date: Re: Better sorting using threads?
  • Previous by thread: Re: What would cause persistentStoreForURL: to return nil?
  • Next by thread: performSelector doesn't work for modal window
  • Index(es):
    • Date
    • Thread