Je suis en train de sous-classe NSOutlineView. Voici mon code:
OutlineViewSublcass.h:
#import <Cocoa/Cocoa.h>
@interface OutlineViewSubclass : NSOutlineView {
}
@end
OutlineViewSubclass.m:
#import "OutlineViewSubclass.h"
@implementation OutlineViewSubclass
- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
printf("debug A\n");
return self;
}
- (void)awakeFromNib
{
printf("debug B\n");
}
@end
La sortie de débogage est:
debug B
Pourquoi n'est-ce pas (id)initWithFrame:(NSRect)image appelée?