Re: Default Core Data errors

2009-10-14 Thread Rick Mann
I did exactly that for readFromURL. It comes back with no errors. The dialog is not displayed until after that method returns. I'll try the configure call. On Oct 14, 2009, at 12:31:28, Ben Trumbull wrote: On Oct 14, 2009, at 12:21 PM, Rick Mann wrote: In the simplest case, I don't create

Re: Default Core Data errors

2009-10-14 Thread Ben Trumbull
On Oct 14, 2009, at 12:21 PM, Rick Mann wrote: In the simplest case, I don't create any entities. I don't override any of NSPersistentDocument's persistence-related methods. I just save the new untitled document, then try to re-open it. You can override the methods declared in NSPersisten

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
In the simplest case, I don't create any entities. I don't override any of NSPersistentDocument's persistence-related methods. I just save the new untitled document, then try to re-open it. On Oct 14, 2009, at 12:11:29, Ben Trumbull wrote: Do you check, and at least assert, if any API that h

re: Default Core Data errors

2009-10-14 Thread Ben Trumbull
Do you check, and at least assert, if any API that has an NSError** parameter returns one ? (typically a return value of NO or nil). For Core Data, you'll always want to check adding a store to the coordinator, saving, and fetching. For your documented based app, the NSDocument APIs can

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
Well, I discovered the willPresentError delegate method. From that, I got: (gdb) po inError Error Domain=NSCocoaErrorDomain Code=256 UserInfo=0x200272ea0 "The document “Untitled.telem” could not be opened. " (gdb) po [inError userInfo] { NSLocalizedDescription = "The document \U201cUnt

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
I knew about po, but sometimes it says the thing is nil, but then I'll go back to my code and write NSLog() statements, and it prints something out, so I felt like po wasn't reliable. Also, when accessing collections, it was easier to write loops in ObjC. But I'll give this a shot, thanks!

Re: Default Core Data errors

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 10:30 AM, Rick Mann wrote: > Is there a way I can get at that programmatically, rather than via gdb? I'm > very clumsy in gdb. Your time will be better spent learning how to use the debugger. Quick crash course: 1. Use `po` to print objects. Example: >> po theError 2.

Re: Default Core Data errors

2009-10-14 Thread Volker in Lists
Rick, you can use po and than most of what you are used in Obj-C like you would use in NSLog. Or just use NSLog and any of the properties a NSError has. Cheers, Volker Am 14.10.2009 um 19:30 schrieb Rick Mann: > > On Oct 14, 2009, at 09:57:58, Kyle Sluder wrote: > >> On Wed, Oct 14, 2009 at

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
On Oct 14, 2009, at 09:51:15, Volker in Lists wrote: Rick, which StoreType are you using? If it is XML it could be worth looking into the raw xml. Otherwise more information on the model and any special methods (if any) could be useful. Any changes to the standard CoreData template provi

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
On Oct 14, 2009, at 09:57:58, Kyle Sluder wrote: On Wed, Oct 14, 2009 at 9:44 AM, Rick Mann wrote: Breaking on all -presentError:, it finally stops here: Okay, this is the point at which you examine the NSError and see if it has any more information for you. :) Is there a way I can get a

Re: Default Core Data errors

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 9:44 AM, Rick Mann wrote: > Breaking on all -presentError:, it finally stops here: Okay, this is the point at which you examine the NSError and see if it has any more information for you. :) --Kyle Sluder ___ Cocoa-dev mailing

Re: Default Core Data errors

2009-10-14 Thread Volker in Lists
Rick, which StoreType are you using? If it is XML it could be worth looking into the raw xml. Otherwise more information on the model and any special methods (if any) could be useful. Any changes to the standard CoreData template provided by Xcode? Is the file readable at all from finder usin

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
On Oct 14, 2009, at 09:34:20, Kyle Sluder wrote: On Wed, Oct 14, 2009 at 9:06 AM, Rick Mann wrote: No exceptions (I checked "Stop on Objective-C Exceptions" and created a symbolic breakpoint on "objc_exception_throw" just to be sure). Also try breaking on -[NSApp presentError:]. Breaki

Re: Default Core Data errors

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 9:06 AM, Rick Mann wrote: > No exceptions (I checked "Stop on Objective-C Exceptions" and created a > symbolic breakpoint on "objc_exception_throw" just to be sure). Also try breaking on -[NSApp presentError:]. --Kyle Sluder ___

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
Do you meant the console in Xcode? There's nothing there (and I checked Console.app just to be sure, same stuff there). No exceptions (I checked "Stop on Objective-C Exceptions" and created a symbolic breakpoint on "objc_exception_throw" just to be sure). On Oct 14, 2009, at 03:10:49, Volke

Re: Default Core Data errors

2009-10-14 Thread Volker in Lists
Hi Rick, any messages in the console? Usually you should get more information there. Also, what happens when run from Xcode in debug settings? Maybe activate an objc_exception_throw breakpoint in advance. Cheers, Volker Am 14.10.2009 um 10:07 schrieb Rick Mann: > I'm having some issues with m

Default Core Data errors

2009-10-14 Thread Rick Mann
I'm having some issues with my Core Data app. It's based on the Xcode 3.2 Core Data document stationery. I thought it was working okay earlier, but now the simplest operation doesn't work. I launch my app, create a new document, save it, and then try to re-open it. The app displays an aler