Init with something....
Init with something....
- Subject: Init with something....
- From: Sandro Noel <email@hidden>
- Date: Sat, 9 Dec 2006 22:29:38 -0500
Greetings.
Another one,
when i create a class,
I override the init like this,...
- (id) init{
if ((self = [super init])) {// superclass may return nil
// do init code here.
}
return self;
}
but what if i want to init with a file's content,
I still want to call the init method, for my normal init code to run.
so would this be a good way of doing it ?
of am i over/miss doing it again ....
- (id) initWithFile:(NSString *) path{
if ((self = [self init])) {
[self loadFile:path];
}
return self;
}
again thank you and please forgive, if my questions seem very
beginner type :)
Sandro Noel.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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