<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Codec &#187; self</title>
	<atom:link href="http://www.trembl.org/codec/tag/self/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trembl.org/codec</link>
	<description>A Personal Polylogic Code/Decode &#039;Zettelkasten&#039;</description>
	<lastBuildDate>Fri, 10 Sep 2010 09:12:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>The mystery of self.* &#8211; resolved?</title>
		<link>http://www.trembl.org/codec/259/</link>
		<comments>http://www.trembl.org/codec/259/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 11:50:26 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[self]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=259</guid>
		<description><![CDATA[self If you want to access a property of self using accessor methods, you must explicitly call out self as illustrated in this example: self.age = 10; If you do not use self., you access the instance variable directly. In the following example, the set accessor method for the age property is not invoked: age [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>self</strong><br />
If you want to access a property of self using accessor methods, you must explicitly call out self as illustrated in this example:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">self.age <span style="color: #002200;">=</span> <span style="color: #2400d9;">10</span>;</pre></div></div>

<p>If you do not use self., you access the instance variable directly. In the following example, the set<br />
accessor method for the age property is not invoked:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">age <span style="color: #002200;">=</span> <span style="color: #2400d9;">10</span>;</pre></div></div>

</blockquote>
<p>p57, The Objective-C 2.0 Programming Language Language (v2008-06-09)<br />
<a href="http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/ObjectiveC/Articles/ocObjectsClasses.html#//apple_ref/doc/uid/TP30001163-CH11-SW24">p22, The Objective-C 2.0 Programming Language Language (v2009-10-19)</a></p>
<p>So basically it&#8217;s a shortcut to:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">int</span><span style="color: #002200;">*</span> a <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self age<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>self setAge<span style="color: #002200;">:</span><span style="color: #2400d9;">12</span><span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>(providing there is a setter/getter for <em>age</em>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/259/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
