Skip navigation.
 
mlAnother newbie, into and cry for help...
FROM : Neil Jones
DATE : Sun Mar 16 21:06:17 2008

Dear list

I'm just getting started with Cocoa and Obj-C. I've done a little bit 
of Java in the past but mainly I'm a tcl scripter. Apologies for the 
wordiness of the following.

I've been following some of the tutorials and so far have been pretty 
successful at finding the bugs I've introduced, except this one:-

In the NSPersistentDocument Core Data Tutorial, I have had the thing 
working all the way until I added the Department - now the interface 
all works as expected but I cannot save my data anymore. If I invoke 
the File -> Save As option and enter a filename the file doesn't save 
but I get the following logged in the Debugger Console:-

2008-03-16 19:25:43.070 DepartmentAndEmployees[6368:10b] Cannot 
perform operation since entity with name '(null)' cannot be found

However, If I open a file saved by a previous version, before the 
Department entity was added, I can now define my Department, add 
Employees and successfully save the data. (I had to amend the 
department accessor method to make it create a new Department if it 
was unable to fetch one but that seems to work OK).

So, it seems to me that  I've got the UI wired up correctly since it 
works if I can use a document which was successfully saved and I 
should be looking in my code for a bug. But I don't know where to 
start to debug this - I can't find a suitable place to add a 
breakpoint to enter the debugger during the file save routine. Is this 
the time for me to find out about Instruments?

Many thanks

Neil

Related mailsAuthorDate
mlAnother newbie, into and cry for help... Neil Jones Mar 16, 21:06
mlRe: Another newbie, into and cry for help... Neil Jones Mar 16, 21:43
mlRe: Another newbie, into and cry for help... Michael Watson Mar 16, 22:30