• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Overriding NSTextField problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Overriding NSTextField problem
      • From: Andy Lee <email@hidden>
    • Re: Overriding NSTextField problem
      • From: Andy Lee <email@hidden>
  • Prev by Date: CoreAudio and Cocoa
  • Next by Date: Re: Overriding NSTextField problem
  • Previous by thread: Re: Overriding NSTextField problem
  • Next by thread: Re: Overriding NSTextField problem
  • Index(es):
    • Date
    • Thread