Father and child
Father and child
- Subject: Father and child
- From: Lorenzo <email@hidden>
- Date: Sun, 09 May 2004 19:58:28 +0200
Hi,
a father creates an object child this way
child = [[MYChild alloc] initByFather:self];
the child class inits the object this way
- (id)initByFather:(id)sender
{
if(self = [super init]){
father = sender;
}
return self;
}
this way the child object can always call his father.
I have been using this method for so long time successfully
but now I ask to myself:
is a way to avoid to define the father all the time?
In other words, is some API that lets an object know who is his father?
Nothing psycological, of course... :-)
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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.