<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Lucky-Dip Blog: Tag cocoa</title>
    <link>http://blog.lucky-dip.net/articles/tag/cocoa</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>performSelector in RubyCocoa</title>
      <description>&lt;p&gt;
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:
&lt;/p&gt;
&lt;pre class="code"&gt;
performSelectorOnMainThread_withObject_waitUntilDone('method_name:', object, true)
&lt;/pre&gt;

&lt;p&gt;
So two things that took me a while:
&lt;ol&gt;
&lt;li&gt;method_name has a trailing colon. &lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;

</description>
      <pubDate>Tue, 22 Apr 2008 15:01:00 +1000</pubDate>
      <guid isPermaLink="false">urn:uuid:dace920f-6826-4c1f-9893-6f7e58bcb965</guid>
      <author>Brad</author>
      <link>http://blog.lucky-dip.net/articles/2008/04/22/performselector-in-rubycocoa</link>
      <category>ruby</category>
      <category>cocoa</category>
      <trackback:ping>http://blog.lucky-dip.net/articles/trackback/11</trackback:ping>
    </item>
  </channel>
</rss>
