I am making a program in XCode (Obj C) and I have created an object in a program which I am going to call MyObject, however when I run this code:
at this point, when the program is running it errors giving this error twice:
2006-09-28 20:13:51.103 MyProgram[1333] *** -[MyObject copyWithZone:]: selector not recognized [self = 0x5f03d80]
2006-09-28 20:13:51.116 MyProgram[1333] *** -[MyObject copyWithZone:]: selector not recognized [self = 0x5f03d80]
(where 0x5f03d80 is the object I am trying to copy.)
What is going wrong and what do I need to do to make it work?
Code:
MyObject *newObj;
newObj=[[MyObject alloc] init];
//newObj then gets passed to a different method.
newObj=[newObj copy];
2006-09-28 20:13:51.103 MyProgram[1333] *** -[MyObject copyWithZone:]: selector not recognized [self = 0x5f03d80]
2006-09-28 20:13:51.116 MyProgram[1333] *** -[MyObject copyWithZone:]: selector not recognized [self = 0x5f03d80]
(where 0x5f03d80 is the object I am trying to copy.)
What is going wrong and what do I need to do to make it work?