Skip navigation.
 
mlRe: performSelectorOnMainThread
FROM : Buddy Kurz
DATE : Thu Jul 20 16:40:17 2006

Are you including the colon at the end of your selector?

[yourObject performSelectorOnMainThread:@selector(yourSelector:) 
withObject:arg waitUntilDone:wait]



On Jul 20, 2006, at 7:04 AM, Eric Blanpied wrote:

> I'm trying to use (void)performSelectorOnMainThread:(SEL)aSelector 
> withObject:(id)arg waitUntilDone:(BOOL)wait, and I don't understand 
> how to receive the argument.
>
> From the docs: "The method should not have a significant return 
> value and should take a single argument of type id, or no arguments."
>
> I can make it work when my method has no arguments, but I want to 
> pass a dictionary with some data. When I add (id)arg or (id*)arg, I 
> get an exception with "selector not recognized".
>
> What's the proper way to do this, and how would I retrieve the dict 
> once I got it? Would I cast the object as an NSDictionary?
>
> A bit of a sample is probably all I need.
>
> Thanks
>
> -e
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlperformSelectorOnMainThread Eric Blanpied Jul 20, 16:04
mlRe: performSelectorOnMainThread Buddy Kurz Jul 20, 16:40
mlRe: performSelectorOnMainThread James Bucanek Jul 20, 16:43
mlRe: performSelectorOnMainThread Sean McBride Jul 20, 17:44
mlRe: performSelectorOnMainThread Eric Blanpied Jul 20, 20:07