Re: Subclassing in IB and init methods
Re: Subclassing in IB and init methods
- Subject: Re: Subclassing in IB and init methods
- From: Vince DeMarco <email@hidden>
- Date: Tue, 10 Feb 2004 11:13:05 -0800
On Feb 10, 2004, at 10:40 AM, String wrote:
I'm trying to subclass NSTextView in IB (MyTextView). I've added init
methods w/in my subclass that match the method signatures of
NSTextView. My text view object in IB uses MyTextView. All is fine.
If I break in AwakeFromNIB, the outlet connected to the text view isa
MyTextView instance. However, if I set breakpoints in the init methods
of MyTextView, they are never hit.
Can anyone shed some light on this ?
Read the FAQ in IB.
Help->FAQ
Cocoa
Why isn't my initWithFrame: method called?
initWithFrame: is only called when you have added a Custom View object
to your window. The initWithFrame: message is sent to the class you
specified in the Attributes Info Panel. Other widgets will not receive
initWithFrame: messages. In this case you should just implement a
-(void)awakeFromNib method to handle any further setup at runtime.
_______________________________________________
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.