Re: How do I know what class sent a message?
Re: How do I know what class sent a message?
- Subject: Re: How do I know what class sent a message?
- From: Andreas Mayer <email@hidden>
- Date: Mon, 7 Jun 2004 07:05:39 +0200
Am 07.06.2004 um 05:36 schrieb April Gendill:
I need to be able to init a class
You do not "init a class". I presume you mean you'll initialize an
instance of a class.
and pass it info then tell the sending class to perform a selector
when it's done
Are you going to start a separate thread? Otherwise this seems
unnecessary. When you send a message to an object the appropriate
method will be fully executed before the next statement in the calling
method.
some code ...
[someObject someSelector];
more code // someObject's someSelector method will be finished when
this code executes
1 how do I know the class that called this method?
You don't you will have to give it the sending object as a parameter:
- (void)openWithTarget:(id)target action:(SEL)selector;
[database openWithTarget:self action:@selector(done:)];
joar's answer covers the rest. :)
Andreas
_______________________________________________
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.