Re: What would cause persistentStoreForURL: to return nil?
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