Allocating like this:
NSDisclosureButtonCell *result = [[NSDisclosureButtonCell alloc] initWithControlSize: inControlSize];
fails with the exact same error message as:
NSDisclosureButtonCell *result = [NSDisclosureButtonCell alloc];
// next line shows a valid object in "result"
NSLog(@"result = %@", result);
// chokes here
[result initWithControlSize: inControlSize];
error log:
*** -[NSDisclosureButtonCell initWithControlSize:]: selector not recognized
I've read in multiple places that you should never split it up like you're doing. It should always be alloc/init'd together.
Hadn't heard that. Although I never alloc/init in two steps unless there is a problem and I want to see what's happening...