method returning wrong variable
- by cocoanewbie
This class I'm working with has three instance variables I'm interested in, NSmutablearrays xArray yArray and zArray, there are also other NSmutablearrays, a, bArray and c.
I just added accessors
- (NSMutableArray *) xArray {
return xArray;
}
ditto for y and z.
However, it's returning yArray, zArray and bArray for some reason.
Why is that happening?
Okay, I just changed the names of the methods to GetXArray and everything seems to be returning the right variables. Now I'm really confused. How the heck did this happen and how do I prevent this from happening in the future?