Re: subclass weirdness
Re: subclass weirdness
- Subject: Re: subclass weirdness
- From: Koen van der Drift <email@hidden>
- Date: Mon, 30 Jun 2003 20:16:03 -0400
On Sunday, June 29, 2003, at 10:51 PM, Andy Lee wrote:
When staring fails, it's time to resort to brute-force debugging. Put
in NSLog() statements. Make sure the "mySub" in your "[mySub
foo:aString]" statement is in fact an instance of MySub and not
MyBase. It's simple to do:
NSLog(@"mySub is an instance of %@", [mySub className]);
Thanks, I didn't know of the className method. This helped me find the
problem very quickly - indeed a typemismatch. I was inserting an array
of mySub objects into another array, but actually I was inserting the
array as one object, instead of separate mySub objects.
- Koen.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.