Re: Two questions about CoreData migration
Re: Two questions about CoreData migration
- Subject: Re: Two questions about CoreData migration
- From: Quincey Morris <email@hidden>
- Date: Sat, 23 Aug 2008 09:44:14 -0700
On Aug 23, 2008, at 08:00, Timothy Larkin wrote:
I went so far as to subclass NSDocumentController, overriding
openDocumentWithContentsOfURL:absoluteURL display:error:. I tried
many ideas, including closing the document and having NSRunLoop send
a message to reopen the document after openDocument had returned.
Even with this desperate approach, the document opened as
sourceURL~.xml, which was very perplexing.
The resolution is quite strange. I had been setting a break point in
the over-ride function, so that I could examine the state of the
document after I called super openDocument. I discovered, quite by
accident, that if I removed the breakpoint, the document opened as
sourceURL, as expected. With the break point: sourceURL~.xml;
without the break point: sourceURL.xml. This makes absolutely no
sense to me, but it is certainly the case.
If you can demonstrate this in a simple project, it would be a good
candidate for a bug report to Apple. You actually have 3 things to
report:
1. The above problem.
2. Your original problem, where the wrong file gets opened.
3. A documentation problem, where migration in a NSPersistentDocument
context apparently requires some extra code that isn't documented.
_______________________________________________
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