• 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: Subclassing in IB and init methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Subclassing in IB and init methods (From: String <email@hidden>)

  • Prev by Date: Re: Making the correct button the default button?
  • Next by Date: Re: base64
  • Previous by thread: Subclassing in IB and init methods
  • Next by thread: Help Wanted / Freelance Developers
  • Index(es):
    • Date
    • Thread