> 2009/4/11 Trygve Inda <cocoa...@xericdesign.com>
> 
> I have a thread. Depending on how it is called, I need to do something
>> different at the end of the main processing so I wanted to pass a selector
>> into the thread so it could call it when it was ready.
>> 
>> I could just pass an NSNumber and do case1, case2 etc, but thought it'd be
>> nice to just do the equivalent of passing a function pointer.
> 
> 
> You could create an NSInvocation object and pass that.
> 
> sherm--

It does not seem I can invoke this on the main thread.

Basically I just need to use a function pointer. How does Cocoa do this?

I need to pass either someMethod or someOtherMethod and later call it with

[self performSelectorOnMainThread:theMethod withObject:nil
waitUntilDone:NO];

Is this normally done with NSStringFromSelector and NSSelectorFromString ?


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to