Re: Overriding NSTextField problem
Re: Overriding NSTextField problem
- Subject: Re: Overriding NSTextField problem
- From: Andy Lee <email@hidden>
- Date: Sun, 24 Feb 2002 08:40:26 -0500
My apologies. I just checked the docs, and the designated initializer
for NSTextView is actually:
- (id)initWithFrame:(NSRect)frameRect textContainer:(NSTextContainer *)aTextContainer
When in doubt, check the class docs.
--Andy
At 2:32 PM +0100 2/24/02, Cyril Godefroy wrote:
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.