<?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 for Blog @ Tim Isted</title>
	<atom:link href="http://www.timisted.net/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.timisted.net/blog</link>
	<description>Cocoa Programming and Other Things</description>
	<pubDate>Wed, 07 Jan 2009 12:19:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>Comment on Core Data Migration and Versioning by Alej</title>
		<link>http://www.timisted.net/blog/archive/core-data-migration/#comment-4479</link>
		<dc:creator>Alej</dc:creator>
		<pubDate>Mon, 22 Dec 2008 05:01:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.timisted.net/blog/?p=181#comment-4479</guid>
		<description>Remember to clean all your targets before trying again, to avoid the can’t merge models with two different entities named ‘Person’. error</description>
		<content:encoded><![CDATA[<p>Remember to clean all your targets before trying again, to avoid the can’t merge models with two different entities named ‘Person’. error</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Bindable Custom NSView Subclass by Mohan Embar</title>
		<link>http://www.timisted.net/blog/archive/a-bindable-custom-nsview-subclass/#comment-4478</link>
		<dc:creator>Mohan Embar</dc:creator>
		<pubDate>Mon, 22 Dec 2008 00:39:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.timisted.net/blog/?p=259#comment-4478</guid>
		<description>Excellent tutorial. Thanks so much.</description>
		<content:encoded><![CDATA[<p>Excellent tutorial. Thanks so much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Core Data and Sync Services by Alej</title>
		<link>http://www.timisted.net/blog/archive/core-data-and-sync-services/#comment-4470</link>
		<dc:creator>Alej</dc:creator>
		<pubDate>Sat, 20 Dec 2008 19:02:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.timisted.net/blog/?p=123#comment-4470</guid>
		<description>Is it possible to use sync services to sync data across a network?</description>
		<content:encoded><![CDATA[<p>Is it possible to use sync services to sync data across a network?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Bindable Custom NSView Subclass by Ian Turner</title>
		<link>http://www.timisted.net/blog/archive/a-bindable-custom-nsview-subclass/#comment-4367</link>
		<dc:creator>Ian Turner</dc:creator>
		<pubDate>Wed, 10 Dec 2008 12:29:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.timisted.net/blog/?p=259#comment-4367</guid>
		<description>Really great tutorial. This is a problem that I tried to work out a few weeks ago and decided to go on another route because it seemed better at the time. This tutorial might just make me have another go though. You rock.</description>
		<content:encoded><![CDATA[<p>Really great tutorial. This is a problem that I tried to work out a few weeks ago and decided to go on another route because it seemed better at the time. This tutorial might just make me have another go though. You rock.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Multiple Windows with Core Data by Gianandrea</title>
		<link>http://www.timisted.net/blog/archive/multiple-windows-with-core-data/#comment-3081</link>
		<dc:creator>Gianandrea</dc:creator>
		<pubDate>Sat, 04 Oct 2008 20:14:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.timisted.net/blog/?p=3#comment-3081</guid>
		<description>Thanx Tim, 
I really appreciate your examples. They’re very useful! Kind regards… Gianandrea</description>
		<content:encoded><![CDATA[<p>Thanx Tim,<br />
I really appreciate your examples. They’re very useful! Kind regards… Gianandrea</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Core Data Migration and Versioning by Websites tagged "versioning" on Postsaver</title>
		<link>http://www.timisted.net/blog/archive/core-data-migration/#comment-2896</link>
		<dc:creator>Websites tagged "versioning" on Postsaver</dc:creator>
		<pubDate>Sun, 21 Sep 2008 08:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.timisted.net/blog/?p=181#comment-2896</guid>
		<description>[...] - Core Data Migration and Versioning saved by partyguy112008-08-21 - Apache WebDAV and Subversion Autoversioning saved by [...]</description>
		<content:encoded><![CDATA[<p>[...] - Core Data Migration and Versioning saved by partyguy112008-08-21 - Apache WebDAV and Subversion Autoversioning saved by [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Multiple Windows with Core Data by User links about "coredata" on iLinkShare</title>
		<link>http://www.timisted.net/blog/archive/multiple-windows-with-core-data/#comment-2779</link>
		<dc:creator>User links about "coredata" on iLinkShare</dc:creator>
		<pubDate>Wed, 10 Sep 2008 01:33:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.timisted.net/blog/?p=3#comment-2779</guid>
		<description>[...] public links &#124; iLinkShare  2 votesWhat Were We Thinking?&#62;&#62; saved by chrisbe 1 days ago1 votesMultiple Windows with Core Data&#62;&#62; saved by T1o2b3i 1 days ago3 votesiRatchet 1.85&#62;&#62; saved by iamcam 2 days ago2 [...]</description>
		<content:encoded><![CDATA[<p>[...] public links | iLinkShare  2 votesWhat Were We Thinking?&gt;&gt; saved by chrisbe 1 days ago1 votesMultiple Windows with Core Data&gt;&gt; saved by T1o2b3i 1 days ago3 votesiRatchet 1.85&gt;&gt; saved by iamcam 2 days ago2 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on On Cocoa Bindings – &#8220;Let Us Break Their Bonds Asunder&#8221; by twobyte</title>
		<link>http://www.timisted.net/blog/archive/on-cocoa-bindings/#comment-2775</link>
		<dc:creator>twobyte</dc:creator>
		<pubDate>Thu, 04 Sep 2008 22:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.timisted.net/blog/?p=200#comment-2775</guid>
		<description>You can check some more bindings examples from Malcolm Crawford who is BTW a Senior Technical Writer at Apple Inc. here http://homepage.mac.com/mmalc/CocoaExamples/controllers.html</description>
		<content:encoded><![CDATA[<p>You can check some more bindings examples from Malcolm Crawford who is BTW a Senior Technical Writer at Apple Inc. here <a href="http://homepage.mac.com/mmalc/CocoaExamples/controllers.html" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/homepage.mac.com/mmalc/CocoaExamples/controllers.html?referer=');">http://homepage.mac.com/mmalc/CocoaExamples/controllers.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on On Cocoa Bindings – &#8220;Let Us Break Their Bonds Asunder&#8221; by Tim Isted</title>
		<link>http://www.timisted.net/blog/archive/on-cocoa-bindings/#comment-2017</link>
		<dc:creator>Tim Isted</dc:creator>
		<pubDate>Thu, 28 Aug 2008 11:34:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.timisted.net/blog/?p=200#comment-2017</guid>
		<description>This is indeed so -- and thank you for pointing this out; I should have included information on this in the body of the post.

By default, NSObject provides &lt;strong&gt;automatic key-value observing&lt;/strong&gt;. Under this default behaviour, you in fact do not actually need to call either 'willChangeValueForKey:' &lt;strong&gt;or&lt;/strong&gt; 'didChangeValueForKey:' as these will be called for you if a call is made to a KVC accessor method (e.g. 'setTheString:').

But, you can also disable this automatic notification such that you do need to notify observers manually; this is extremely useful in cases where you need to change large numbers of values and want to control when notifications are sent out. It's also useful in that you can change the behaviour to send notifications only if the new value is different from its current value:
&lt;pre lang="objc"&gt;
- (void)setTheString:(NSString *)value
{
	if (  ![_theString isEqualToString:value] )
	{
		[self willChangeValueForKey:@"theString"];
        	_theString = value;
        	[self didChangeValueForKey:@"theString"];
	}
}
&lt;/pre&gt;

You can override the class method +automaticallyNotifiesObserversForKey: to specify that certain keys do not provide the automatic behaviour:
&lt;pre lang="objc"&gt;
+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)theKey
{
	BOOL automatic = NO;
 	
	if ( [theKey isEqualToString:@"theString"] )
	{
        	automatic=NO;
    	}
	else
	{
		automatic=[super automaticallyNotifiesObserversForKey:theKey];
	}
	return automatic;
}
&lt;/pre&gt;

Both these methods and further explanation can be found at: &lt;a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/Concepts/AutoVsManual.html" target="_blank" rel="nofollow"&gt;Apple Developer Connection : KVO Programming Guide : Automatic Versus Manual Support&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>This is indeed so &#8212; and thank you for pointing this out; I should have included information on this in the body of the post.</p>
<p>By default, NSObject provides <strong>automatic key-value observing</strong>. Under this default behaviour, you in fact do not actually need to call either &#8216;willChangeValueForKey:&#8217; <strong>or</strong> &#8216;didChangeValueForKey:&#8217; as these will be called for you if a call is made to a KVC accessor method (e.g. &#8217;setTheString:&#8217;).</p>
<p>But, you can also disable this automatic notification such that you do need to notify observers manually; this is extremely useful in cases where you need to change large numbers of values and want to control when notifications are sent out. It&#8217;s also useful in that you can change the behaviour to send notifications only if the new value is different from its current value:</p>

<div class="wp_syntax"><div class="code"><pre class="objc objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>setTheString<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>value
<span style="color: #002200;">&#123;</span>
	<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>  <span style="color: #002200;">!</span><span style="color: #002200;">&#91;</span>_theString isEqualToString<span style="color: #002200;">:</span>value<span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
	<span style="color: #002200;">&#123;</span>
		<span style="color: #002200;">&#91;</span>self willChangeValueForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;theString&quot;</span><span style="color: #002200;">&#93;</span>;
        	_theString <span style="color: #002200;">=</span> value;
        	<span style="color: #002200;">&#91;</span>self didChangeValueForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;theString&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#125;</span>
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>You can override the class method +automaticallyNotifiesObserversForKey: to specify that certain keys do not provide the automatic behaviour:</p>

<div class="wp_syntax"><div class="code"><pre class="objc objc" style="font-family:monospace;"><span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>automaticallyNotifiesObserversForKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>theKey
<span style="color: #002200;">&#123;</span>
	<span style="color: #a61390;">BOOL</span> automatic <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>;
&nbsp;
	<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> <span style="color: #002200;">&#91;</span>theKey isEqualToString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;theString&quot;</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
	<span style="color: #002200;">&#123;</span>
        	automatic<span style="color: #002200;">=</span><span style="color: #a61390;">NO</span>;
    	<span style="color: #002200;">&#125;</span>
	<span style="color: #a61390;">else</span>
	<span style="color: #002200;">&#123;</span>
		automatic<span style="color: #002200;">=</span><span style="color: #002200;">&#91;</span>super automaticallyNotifiesObserversForKey<span style="color: #002200;">:</span>theKey<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#125;</span>
	<span style="color: #a61390;">return</span> automatic;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>Both these methods and further explanation can be found at: <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/Concepts/AutoVsManual.html" target="_blank" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/Concepts/AutoVsManual.html?referer=');">Apple Developer Connection : KVO Programming Guide : Automatic Versus Manual Support</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on On Cocoa Bindings – &#8220;Let Us Break Their Bonds Asunder&#8221; by Steve</title>
		<link>http://www.timisted.net/blog/archive/on-cocoa-bindings/#comment-2016</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 27 Aug 2008 22:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.timisted.net/blog/?p=200#comment-2016</guid>
		<description>The code:
[self willChangeValueForKey:@"theString"];

is not needed in the setter for a value. It is automatically generated.</description>
		<content:encoded><![CDATA[<p>The code:<br />
[self willChangeValueForKey:@"theString"];</p>
<p>is not needed in the setter for a value. It is automatically generated.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
