<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Using NSTreeController</title>
	<atom:link href="http://espresso-served-here.com/2008/04/06/using-nstreecontroller/feed/" rel="self" type="application/rss+xml" />
	<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/</link>
	<description></description>
	<lastBuildDate>Sat, 31 Oct 2009 11:40:50 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Matthias</title>
		<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/#comment-1107</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Fri, 19 Jun 2009 12:22:56 +0000</pubDate>
		<guid isPermaLink="false">http://jonathandann.wordpress.com/?p=46#comment-1107</guid>
		<description>Jonathan, thanks for the article. In the groupDescendants method, shouldn&#039;t this line:

[groupsArray addObject:[node groupDescendants]];

rather read:

[groupsArray addObjectsFromArray:[node groupDescendants]];

Thanks, M.</description>
		<content:encoded><![CDATA[<p>Jonathan, thanks for the article. In the groupDescendants method, shouldn&#8217;t this line:</p>
<p>[groupsArray addObject:[node groupDescendants]];</p>
<p>rather read:</p>
<p>[groupsArray addObjectsFromArray:[node groupDescendants]];</p>
<p>Thanks, M.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elise van Looij</title>
		<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/#comment-1189</link>
		<dc:creator>Elise van Looij</dc:creator>
		<pubDate>Sat, 14 Mar 2009 14:44:50 +0000</pubDate>
		<guid isPermaLink="false">http://jonathandann.wordpress.com/?p=46#comment-1189</guid>
		<description>Ernest, you need to set the Value Transformer (in IB under the Value property) on your NSButtonCell, NSNegateBoolean, if I&#039;m not mistaken and if the value of the cell is an integer.</description>
		<content:encoded><![CDATA[<p>Ernest, you need to set the Value Transformer (in IB under the Value property) on your NSButtonCell, NSNegateBoolean, if I&#8217;m not mistaken and if the value of the cell is an integer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/#comment-1191</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Tue, 24 Feb 2009 09:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://jonathandann.wordpress.com/?p=46#comment-1191</guid>
		<description>Hi Ernest,

There could be an issue with incorrect bindings. What I did in my example was to bind the NSValueBinding (&quot;Value&quot; in IB) of the table column to the tree controller&#039;s arrangedObjects.displayName keyPath. My first thought is that, as the NSValueBinding of the NSButtonCell refers to the on/off state of the button, the binding is turning them on if the bound string is not nil.

Not sure how you would solve this one as there are two values you need to consider here, the value and the label. This should be possible with bindings, but I&#039;d do a long search on the cocoa-dev mailing list from Apple, this kind of thing comes up regularly.</description>
		<content:encoded><![CDATA[<p>Hi Ernest,</p>
<p>There could be an issue with incorrect bindings. What I did in my example was to bind the NSValueBinding (&#8220;Value&#8221; in IB) of the table column to the tree controller&#8217;s arrangedObjects.displayName keyPath. My first thought is that, as the NSValueBinding of the NSButtonCell refers to the on/off state of the button, the binding is turning them on if the bound string is not nil.</p>
<p>Not sure how you would solve this one as there are two values you need to consider here, the value and the label. This should be possible with bindings, but I&#8217;d do a long search on the cocoa-dev mailing list from Apple, this kind of thing comes up regularly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ernest</title>
		<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/#comment-1190</link>
		<dc:creator>Ernest</dc:creator>
		<pubDate>Thu, 19 Feb 2009 16:32:28 +0000</pubDate>
		<guid isPermaLink="false">http://jonathandann.wordpress.com/?p=46#comment-1190</guid>
		<description>Jonathan, thank you so much for this example.  I have successfully implemented it into my project, but now I have a question for you.  Maybe I am just not doing something right, but here it is:  I added an Outline View to my window, which comes with the standard NSScrollView -&gt; NSOutlineView -&gt; NSTableColumn -&gt; NSTextFieldCell.  This works perfectly with my Tree Controller.  However, when I change the NSTextFieldCell to use the check box cell (NSButtonCell) and run the application I get nothing but &quot;Check&quot; for my list?  Am I missing something with the node in which I have to change to support NSButtonCell vs NSTextFieldCell?</description>
		<content:encoded><![CDATA[<p>Jonathan, thank you so much for this example.  I have successfully implemented it into my project, but now I have a question for you.  Maybe I am just not doing something right, but here it is:  I added an Outline View to my window, which comes with the standard NSScrollView -&gt; NSOutlineView -&gt; NSTableColumn -&gt; NSTextFieldCell.  This works perfectly with my Tree Controller.  However, when I change the NSTextFieldCell to use the check box cell (NSButtonCell) and run the application I get nothing but &#8220;Check&#8221; for my list?  Am I missing something with the node in which I have to change to support NSButtonCell vs NSTextFieldCell?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Dann</title>
		<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/#comment-1100</link>
		<dc:creator>Jonathan Dann</dc:creator>
		<pubDate>Tue, 20 Jan 2009 18:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://jonathandann.wordpress.com/?p=46#comment-1100</guid>
		<description>Hi Joseph,

Glad it helped. As for the benefit, it&#039;s mainly to help you ensure that changes to the model are automatically pushed to the tree controller without you having to intervene or tell the outline view to reload data, saving you the maintenance of the application logic in, what is likely, a fairly integral part of your app. Each time you add a node object to the managed object context (in the full-blown core data version I&#039;ve also got on this blog) the tree controller will update its display.

It doesn&#039;t come without its caveats, which were the main reason for writing this post. When I wrote it there were no decent tutorials for the Leopard world that included the new NSTreeNode, which I saw as the saving grace of this whole setup.

You save yourself writing the datasource methods, which is a both a blessing (not having to write them) and a curse (having to deal with the tree controller&#039;s representation of things).

So really my answer, is &quot;not much, until I&#039;d written all this&quot; but it was a challenge to get it working. What&#039;s probably more important are the extensions on NSTreeNode themselves, which allow to to properly navigate the content of the tree.

Bindings with NSTreeController also allow you to remove a lot of other code, for example that which needs to know when the selected objects in the tree change. Without the tree controller you have to rely on notifications, which (in my experiments) are only sent for user-side updates. If you use bindings or simple KVO on the NSTreeController&#039;s selectedIndexPath property then you save yourself some debugging hassle.

Have you tried using table view&#039;s with and without NSArrayController? You see the same reduction in code when you do adopt bindings in those cases, too/

Sorry if this has been a bit waffling, I&#039;m way too tired.

Jon</description>
		<content:encoded><![CDATA[<p>Hi Joseph,</p>
<p>Glad it helped. As for the benefit, it&#8217;s mainly to help you ensure that changes to the model are automatically pushed to the tree controller without you having to intervene or tell the outline view to reload data, saving you the maintenance of the application logic in, what is likely, a fairly integral part of your app. Each time you add a node object to the managed object context (in the full-blown core data version I&#8217;ve also got on this blog) the tree controller will update its display.</p>
<p>It doesn&#8217;t come without its caveats, which were the main reason for writing this post. When I wrote it there were no decent tutorials for the Leopard world that included the new NSTreeNode, which I saw as the saving grace of this whole setup.</p>
<p>You save yourself writing the datasource methods, which is a both a blessing (not having to write them) and a curse (having to deal with the tree controller&#8217;s representation of things).</p>
<p>So really my answer, is &#8220;not much, until I&#8217;d written all this&#8221; but it was a challenge to get it working. What&#8217;s probably more important are the extensions on NSTreeNode themselves, which allow to to properly navigate the content of the tree.</p>
<p>Bindings with NSTreeController also allow you to remove a lot of other code, for example that which needs to know when the selected objects in the tree change. Without the tree controller you have to rely on notifications, which (in my experiments) are only sent for user-side updates. If you use bindings or simple KVO on the NSTreeController&#8217;s selectedIndexPath property then you save yourself some debugging hassle.</p>
<p>Have you tried using table view&#8217;s with and without NSArrayController? You see the same reduction in code when you do adopt bindings in those cases, too/</p>
<p>Sorry if this has been a bit waffling, I&#8217;m way too tired.</p>
<p>Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Crawford</title>
		<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/#comment-1099</link>
		<dc:creator>Joseph Crawford</dc:creator>
		<pubDate>Tue, 20 Jan 2009 03:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://jonathandann.wordpress.com/?p=46#comment-1099</guid>
		<description>This is a very good explanation and has surely helped me understand this a bit better.

I am wondering if there is a benefit to using a tree controller rather than just handling the NSOutlineView groups/leafs using the objects.

What does binding bring to the table that not using them doesn&#039;t?</description>
		<content:encoded><![CDATA[<p>This is a very good explanation and has surely helped me understand this a bit better.</p>
<p>I am wondering if there is a benefit to using a tree controller rather than just handling the NSOutlineView groups/leafs using the objects.</p>
<p>What does binding bring to the table that not using them doesn&#8217;t?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Dann</title>
		<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/#comment-1034</link>
		<dc:creator>Jonathan Dann</dc:creator>
		<pubDate>Sat, 05 Jul 2008 19:28:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathandann.wordpress.com/?p=46#comment-1034</guid>
		<description>@Ralph

Sorry I&#039;m afraid I don&#039;t have anything prepared.  The example app on &lt;a href=&quot;http://katidev.com&quot; rel=&quot;nofollow&quot;&gt;katidev&lt;/a&gt; uses an NSOutlineView, so I&#039;d just create an NSTreeController in that NIB and connect it up as I&#039;ve described in this article.

Jon</description>
		<content:encoded><![CDATA[<p>@Ralph</p>
<p>Sorry I&#8217;m afraid I don&#8217;t have anything prepared.  The example app on <a href="http://katidev.com" rel="nofollow">katidev</a> uses an NSOutlineView, so I&#8217;d just create an NSTreeController in that NIB and connect it up as I&#8217;ve described in this article.</p>
<p>Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Dann</title>
		<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/#comment-1033</link>
		<dc:creator>Jonathan Dann</dc:creator>
		<pubDate>Sat, 05 Jul 2008 19:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://jonathandann.wordpress.com/?p=46#comment-1033</guid>
		<description>@ Ralph,

Sorry I&#039;m afraid I don&#039;t have anything prepared.  The example app on &lt;a href=&quot;http://katidev.com&quot; rel=&quot;nofollow&quot;&gt;katidev&lt;/a&gt; uses an NSOutlineView, so I&#039;d just create an NSTreeController in that NIB and connect it up as I&#039;ve described in this article.

Jon</description>
		<content:encoded><![CDATA[<p>@ Ralph,</p>
<p>Sorry I&#8217;m afraid I don&#8217;t have anything prepared.  The example app on <a href="http://katidev.com" rel="nofollow">katidev</a> uses an NSOutlineView, so I&#8217;d just create an NSTreeController in that NIB and connect it up as I&#8217;ve described in this article.</p>
<p>Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralph</title>
		<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/#comment-1032</link>
		<dc:creator>Ralph</dc:creator>
		<pubDate>Sat, 05 Jul 2008 18:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://jonathandann.wordpress.com/?p=46#comment-1032</guid>
		<description>Hey Jonathan,

do you have a sample Application which combines your ESNode and XSController?</description>
		<content:encoded><![CDATA[<p>Hey Jonathan,</p>
<p>do you have a sample Application which combines your ESNode and XSController?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jakob Dam Jensen</title>
		<link>http://espresso-served-here.com/2008/04/06/using-nstreecontroller/#comment-1031</link>
		<dc:creator>Jakob Dam Jensen</dc:creator>
		<pubDate>Sat, 05 Jul 2008 15:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://jonathandann.wordpress.com/?p=46#comment-1031</guid>
		<description>Thank you so much for this Jonathan - I&#039;ve been trying to get something to work for the last two days, and somehow it all makes sense to me now - thanks to you.

Take care...</description>
		<content:encoded><![CDATA[<p>Thank you so much for this Jonathan &#8211; I&#8217;ve been trying to get something to work for the last two days, and somehow it all makes sense to me now &#8211; thanks to you.</p>
<p>Take care&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
