Re: Encoding custom class from Interface Builder?
Re: Encoding custom class from Interface Builder?
- Subject: Re: Encoding custom class from Interface Builder?
- From: Julio Cesar Silva dos Santos <email@hidden>
- Date: Fri, 6 Jul 2007 11:10:29 -0300
Generally, if you have code that calls visual components like
NSButtons or NSWindows, you must use awakeFromNib, but if your code
does not rely on these components then you can use init.
Julio Cesar Santos
email@hidden
On 06/07/2007, at 10:59, Seth Pellegrino wrote:
On Jul 5, 2007, at 7:55 AM, Stephane Sudre wrote:
Are you are using this custom view multiple times in your project
or are you planning to reuse it in the future?
If the answer is No, then stick with awakeFromNib.
I'm also rather new to Cocoa, so I was wondering under what
conditions should initialization code go in -awakeFromNib and when
it should go in -init. I have a controller class (instantiated in
IB) which makes use of an -init, and an NSLog statement tells me
that -init method gets called on application startup. Why is my -
init method called and Mr. Duniho's isn't?
Thank you,
Seth Pellegrino
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden