performSelector in RubyCocoa

Posted by Brad Tue, 22 Apr 2008 05:01:00 GMT

I had a lot of trouble finding documentation for this. If you want to make a call on the main thread in RubyCocoa, the format is something like:

performSelectorOnMainThread_withObject_waitUntilDone('method_name:', object, true)

So two things that took me a while:

  1. method_name has a trailing colon.
  2. The object the has the method you want to call should be the second argument. I got it in my head it should be the first for some reason.

Trackbacks

Use the following link to trackback from your own site:
http://blog.lucky-dip.net/articles/trackback/11

Comments

Leave a response

Comments