<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: PyObjC First Steps</title>
	<atom:link href="http://bob.pythonmac.org/archives/2005/07/05/pyobjc-first-steps/feed/" rel="self" type="application/rss+xml" />
	<link>http://bob.pythonmac.org/archives/2005/07/05/pyobjc-first-steps/</link>
	<description>Bob's Rants</description>
	<pubDate>Fri, 25 Jul 2008 16:07:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Bob Ippolito</title>
		<link>http://bob.pythonmac.org/archives/2005/07/05/pyobjc-first-steps/#comment-2347</link>
		<dc:creator>Bob Ippolito</dc:creator>
		<pubDate>Tue, 05 Jul 2005 09:11:45 +0000</pubDate>
		<guid isPermaLink="false">/?p=154#comment-2347</guid>
		<description>In most cases you probably want that promoted to an exception anyway, so I tend not to bother with checking-for-None.</description>
		<content:encoded><![CDATA[<p>In most cases you probably want that promoted to an exception anyway, so I tend not to bother with checking-for-None.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronald Oussoren</title>
		<link>http://bob.pythonmac.org/archives/2005/07/05/pyobjc-first-steps/#comment-2346</link>
		<dc:creator>Ronald Oussoren</dc:creator>
		<pubDate>Tue, 05 Jul 2005 08:47:09 +0000</pubDate>
		<guid isPermaLink="false">/?p=154#comment-2346</guid>
		<description>Initializer should be written like this (note the extra if statement):

&lt;code&gt;
class Foo (NSObject):
    def init(self):
         self = super(Foo, self).init()
         if self is None: return None

         self.x = 42
         return self
&lt;/code&gt;

The assigment to self and the subsequent test are necessary because several Cocoa classes return a different self from the initializer or return &lt;code&gt;nil&lt;/code&gt; if initialization failed.</description>
		<content:encoded><![CDATA[<p>Initializer should be written like this (note the extra if statement):</p>
<p><code><br />
class Foo (NSObject):<br />
    def init(self):<br />
         self = super(Foo, self).init()<br />
         if self is None: return None</p>
<p>         self.x = 42<br />
         return self<br />
</code></p>
<p>The assigment to self and the subsequent test are necessary because several Cocoa classes return a different self from the initializer or return <code>nil</code> if initialization failed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
