View Full Version : Modifying a Custom Managed Object Class?

Jun 20, 2010, 12:05 PM
Hey guys, im just breaking into Core Data and as an example I have an 'Employee' Entity that I have created a .h and .m file for using Xcodes automatically tool.

For ex,

I want to make one of the attributes of this Entity dependent on two other attributes. Like fullName is a combination of lastName and firstName.

How do I edit the .h and .m files to do this? Do I add a getFullName method and have it return the combined string? I'd rather just have the fullName attribute construct itself so I can just retrieve it as needed.

Jun 20, 2010, 02:50 PM
What part of this are you having trouble with? You will only need to add a trivial method that combines the two strings to your implementation file, and a declaration to the interface file. You may also have to add an element to the object model file. Is this from a tutorial?