Re: Overiding NSButton initWithFrame: (doesn't work)
Re: Overiding NSButton initWithFrame: (doesn't work)
- Subject: Re: Overiding NSButton initWithFrame: (doesn't work)
- From: email@hidden
- Date: Sat, 2 Feb 2002 10:27:46 -0800
When un-archiving, ie from a nib, the designated initializer is -
(id)initWithCoder:(NSCoder *)decoder
Yes, but use the awakeFromNib method instead that is what its there for.
Hmm. If you're doing stuff that you always want done when you get
created by NSCoder, whether from a nib, a pasteboard, an object archive
file, or whatever, then you should override -initWithCoder:. Overriding
-awakeFromNib would be appropriate only when you have things that you
want to do specifically and only when you are awakened from a nib.
Right?
That said, I don't remember the context of the original issue well
enough to recall which of these was the case there...
Ben Haller
Stick Software