Re: - (id)init
Re: - (id)init
- Subject: Re: - (id)init
- From: Ondra Cada <email@hidden>
- Date: Thu, 25 Jul 2002 16:30:46 +0200
On Thursday, July 25, 2002, at 08:31 , Chong Hiu Pun wrote:
What's the difference between
- (id)init
and
- (void)awakeFromNib ? Which one should I do the initialization inside ?
What about reading some documentation first?
-init... is used for generic objects, made programmatically. -awakeFromNib
is used only for objects made by loading them from a NIB (since they are
_loaded_, not _inited_, init would not be called). For technical reasons
it's a mite more complicated, but the simple rule is
- initialize your engine objects in their init... methods;
- initialize your controller objects (which are placed in NIBs) in their
awakeFromNib methods.
As a matter of fact, so far as I understood your initial question properly,
you want none of them; what you (I think) are seeking for is the
application delegate method applicationDidFinishLoading:.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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: | |
| >- (id)init (From: "Chong Hiu Pun" <email@hidden>) |