• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I know what class sent a message?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: How do I know what class sent a message?
      • From: Andreas Mayer <email@hidden>
References: 
 >How do I know what class sent a message? (From: April Gendill <email@hidden>)

  • Prev by Date: Mouse click vs. mouse held down
  • Next by Date: Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
  • Previous by thread: Re: How do I know what class sent a message?
  • Next by thread: Re: How do I know what class sent a message?
  • Index(es):
    • Date
    • Thread