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: April Gendill <email@hidden>
- Date: Mon, 7 Jun 2004 08:19:49 -0700
I think I miss spoke myself.
I said class but it would seem I meant object.
Joar and Allan I'm glad you overlooked that silly mistake.
Anyway the final method is as follows.
-(void)setupDatabase:(NSDictionary*)dbItem
setupEndedSelector:(SEL)selector target:(id)target
and I end the method:
[target performSelector:selector withObject:finalDB];
So anyway from the calling object I pass self as the target and the
method that then handles the rest of the db info as the selector
[dbControl setupDatabase:rawDb
setupendedSelector:@selector(showUserData:) target:self];
and tah dah! it worked like a charm.
I felt silly because after sending the original post I remembered the
openpanel didEndSelector: method. I'm still not 100% sure how exactly
it figures out who the sending object was but eh, who cares mine works
just peachy.
Thanks everyone
April.
On Jun 6, 2004, at 8:36 PM, April Gendill wrote:
I need to be able to init a class and pass it info then tell the
sending class to perform a selector when it's done example
-(void)setupDatabase setupEndedSelector:(SEL)selector
when I reach the point I need to perform the selector I have two
problems.
1 how do I know the class that called this method?
2 do I call it as follows:
[sendingClass performSelector:@selector(selector:)]; ?
or
[sendingClass performSelector:selector]; ?
Thanks for any help
April.
_______________________________________________
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.
_______________________________________________
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.