Re: initWithFrame vs. awakeFromNib
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.