• 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: initWithFrame vs. awakeFromNib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: initWithFrame vs. awakeFromNib


  • Subject: Re: initWithFrame vs. awakeFromNib
  • From: j o a r <email@hidden>
  • Date: Tue, 1 Apr 2003 13:16:01 +0200

Replace your #1 and #2 with:

1) Your class is created using "initWithCoder:"

Implement "awakeFromNib" or override "initWithCoder:" for additional configuration of custom view classes.

j o a r

On Tuesday, Apr 1, 2003, at 12:43 Europe/Stockholm, Oscar Morales Vivs wrote:

Greetings there. I thought I had the concept well learnt by now. You placed a view in IB and it went like this:

1) The object is created and sent initWithFrame
2) It is configured with the data in the .nib file
3) It is sent awakeFromNib so it can do any extra work necessary for initialization after outlets and targets have been set.

However... I created a NSMatrix subclass and placed it with IB in my window (using the custom class tab in the object inspector in IB). And either initWithFrame isn't called, or the NSMatrix one is called directly. Could someone explain me what's with that and what I'm missing? I can work around it easily (I just placed the code in awakeFromNib) but I'll later want to make that class more generically usable and I'd rather understand how it works properly.
_______________________________________________
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:
    • Errata: initWithFrame vs. awakeFromNib
      • From: j o a r <email@hidden>
References: 
 >initWithFrame vs. awakeFromNib (From: Oscar Morales Vivó <email@hidden>)

  • Prev by Date: Re: How to download a file from a web site?
  • Next by Date: Errata: initWithFrame vs. awakeFromNib
  • Previous by thread: initWithFrame vs. awakeFromNib
  • Next by thread: Errata: initWithFrame vs. awakeFromNib
  • Index(es):
    • Date
    • Thread