Re: Overriding NSTextField problem
Re: Overriding NSTextField problem
- Subject: Re: Overriding NSTextField problem
- From: Cyril Godefroy <email@hidden>
- Date: Sun, 24 Feb 2002 14:32:36 +0100
Yes, hust after sending my mail, I went back to the doc and changed my
init to:
- (id)initWithFrame:(NSRect)frameRect{
if (self = [super initWithFrame:frameRect]){
[self registerForDraggedTypes:[NSArray
arrayWithObject:NSStringPboardType]];
NSLog(@"J ai changi de nature");
}
NSLog (@"Tiens un log");
return self;
}
Unfortunately, I get the same 'no log', and my drag & drop doesn't work,
of course. I guess it is more related to my use of IB etc. That's why I
really don't get it. By the way, overriding init should work (it' an
object isn't it), NSviews have to call init method some day?
Cyril
On Sunday, February 24, 2002, at 02:08 PM, Andy Lee wrote:
Cyril,
The designated initializer for NSTextField (and NSViews in general) is
initWithFrame:, not init. Try overriding initWithFrame:.
--Andy
_______________________________________________
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.