• 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: 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.


References: 
 >How do I know what class sent a message? (From: April Gendill <email@hidden>)

  • Prev by Date: Re: How do I know what class sent a message?
  • Next by Date: Is it possible to make Dock Icon Jump ??
  • 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