• 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
performSelectorOnMainThread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

performSelectorOnMainThread


  • Subject: performSelectorOnMainThread
  • From: John Love <email@hidden>
  • Date: Sat, 10 Jan 2009 14:00:43 -0500

-performSelectorOnMainThread:withObject:waitUntilDone:, according to Apple docs, is passed a SEL method that "should not have a significant return value".

I wish it to return a INT and I figure that that qualifies as in- significant. Given that assumption, my real question is how to implement it. I call:

[self performSelectorOnMainThread:@selector:mySimpleSelector withObject:nil waitUntilDone:YES];

(int) mySimpleSelector {
	if (whatever) return 0;
	else          return 1;
}

via my call to -performSelectorOnMainThread, just how do I access - mySimpleSelector's returned INT? The simplest answer is to not have a return value at all, but rather store the INTs in a global; but I figure there is no time like the present to learn to solve this problem the right way.




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: performSelectorOnMainThread
      • From: "Michael Ash" <email@hidden>
    • Re: performSelectorOnMainThread
      • From: Quincey Morris <email@hidden>
    • Re: performSelectorOnMainThread
      • From: glenn andreas <email@hidden>
    • Re: performSelectorOnMainThread
      • From: Ashley Clark <email@hidden>
    • Re: performSelectorOnMainThread
      • From: Jelle De Laender <email@hidden>
  • Prev by Date: Scroll wheel and cover flow
  • Next by Date: Re: performSelectorOnMainThread
  • Previous by thread: Scroll wheel and cover flow
  • Next by thread: Re: performSelectorOnMainThread
  • Index(es):
    • Date
    • Thread