<?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/"
		>
<channel>
	<title>Comments on: Cocoa Bindings</title>
	<atom:link href="http://mjtsai.com/blog/2004/11/19/cocoa-bindings/feed/" rel="self" type="application/rss+xml" />
	<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/</link>
	<description></description>
	<lastBuildDate>Thu, 18 Mar 2010 20:01:44 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alf Watt</title>
		<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/comment-page-1/#comment-13890</link>
		<dc:creator>Alf Watt</dc:creator>
		<pubDate>Fri, 18 Aug 2006 17:29:06 +0000</pubDate>
		<guid isPermaLink="false">/?p=924#comment-13890</guid>
		<description>I&#039;ve actually had to pull bindings out of two applications due to performance and debugability issues. Read the long sad story in my news feed: http://istumbler.net/feeds/news.rss</description>
		<content:encoded><![CDATA[<p>I've actually had to pull bindings out of two applications due to performance and debugability issues. Read the long sad story in my news feed: <a href="http://istumbler.net/feeds/news.rss" rel="nofollow">http://istumbler.net/feeds/news.rss</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Buzz Andersen</title>
		<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/comment-page-1/#comment-3385</link>
		<dc:creator>Buzz Andersen</dc:creator>
		<pubDate>Mon, 22 Nov 2004 23:13:28 +0000</pubDate>
		<guid isPermaLink="false">/?p=924#comment-3385</guid>
		<description>Admittedly, some of my problems with bindings, as they relate to table views, may have to do with a fundamental lack of understanding.  I&#039;m working on it.</description>
		<content:encoded><![CDATA[<p>Admittedly, some of my problems with bindings, as they relate to table views, may have to do with a fundamental lack of understanding.  I'm working on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/comment-page-1/#comment-3257</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sat, 20 Nov 2004 15:08:28 +0000</pubDate>
		<guid isPermaLink="false">/?p=924#comment-3257</guid>
		<description>Chris: the extra items have different actions than the main items, so just getting them in the arrangedObjects array isn&#039;t enough, I think.

The reason I want to go through the datasource is that I already have model-independent code in a table subclass. One example is code that copies the contents of the table, as displayed by the formatters, to the pasteboard. If I don&#039;t go through the datasource, I have to (a) write this code again, and (b) somehow get access to the proper model keys from inside the table.</description>
		<content:encoded><![CDATA[<p>Chris: the extra items have different actions than the main items, so just getting them in the arrangedObjects array isn't enough, I think.</p>
<p>The reason I want to go through the datasource is that I already have model-independent code in a table subclass. One example is code that copies the contents of the table, as displayed by the formatters, to the pasteboard. If I don't go through the datasource, I have to (a) write this code again, and (b) somehow get access to the proper model keys from inside the table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Hanson</title>
		<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/comment-page-1/#comment-3255</link>
		<dc:creator>Chris Hanson</dc:creator>
		<pubDate>Sat, 20 Nov 2004 09:24:17 +0000</pubDate>
		<guid isPermaLink="false">/?p=924#comment-3255</guid>
		<description>For your second case, you could just subclass NSArrayController and override -arrangedObjects to always return [super arrangedObjects] followed by your extra items.

I don&#039;t know the details of your first case so I can&#039;t help you there.

It&#039;s unclear to me why you would want to go through a table view&#039;s data source to find a value rather than ask the model object directly.  You probably have a specific case in mind that&#039;s just not occurring to me.</description>
		<content:encoded><![CDATA[<p>For your second case, you could just subclass NSArrayController and override -arrangedObjects to always return [super arrangedObjects] followed by your extra items.</p>
<p>I don't know the details of your first case so I can't help you there.</p>
<p>It's unclear to me why you would want to go through a table view's data source to find a value rather than ask the model object directly.  You probably have a specific case in mind that's just not occurring to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manton Reece</title>
		<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/comment-page-1/#comment-3254</link>
		<dc:creator>Manton Reece</dc:creator>
		<pubDate>Sat, 20 Nov 2004 03:38:35 +0000</pubDate>
		<guid isPermaLink="false">/?p=924#comment-3254</guid>
		<description>Michael, that&#039;s one of the most rational opinions about bindings I&#039;ve heard so far. Bottom line for me: great applications cannot be build with zero lines of code. I&#039;ll try bindings when I can require Panther (not anytime soon), but I&#039;m not expecting much.</description>
		<content:encoded><![CDATA[<p>Michael, that's one of the most rational opinions about bindings I've heard so far. Bottom line for me: great applications cannot be build with zero lines of code. I'll try bindings when I can require Panther (not anytime soon), but I'm not expecting much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/comment-page-1/#comment-3253</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sat, 20 Nov 2004 03:12:44 +0000</pubDate>
		<guid isPermaLink="false">/?p=924#comment-3253</guid>
		<description>Fraser: that works, but I have some problems with it. First, it&#039;s not the datasource method. So a table using bindings is indeed special and has to be treated differently from a regular table. Second, it&#039;s not easy to know the name of the key from inside the table. You can&#039;t even ask the table column for the key unless you&#039;ve subclassed the table column and set it up to record its value binding. Also, although I guess it&#039;s possible that a special, optimizing NSArray subclass is used, I&#039;m leery of asking the array controller for all the arrangedObjects when I only need a specific row. WIth the datasource method, I can directly ask for the row.</description>
		<content:encoded><![CDATA[<p>Fraser: that works, but I have some problems with it. First, it's not the datasource method. So a table using bindings is indeed special and has to be treated differently from a regular table. Second, it's not easy to know the name of the key from inside the table. You can't even ask the table column for the key unless you've subclassed the table column and set it up to record its value binding. Also, although I guess it's possible that a special, optimizing NSArray subclass is used, I'm leery of asking the array controller for all the arrangedObjects when I only need a specific row. WIth the datasource method, I can directly ask for the row.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fraser Speirs</title>
		<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/comment-page-1/#comment-3252</link>
		<dc:creator>Fraser Speirs</dc:creator>
		<pubDate>Sat, 20 Nov 2004 00:26:19 +0000</pubDate>
		<guid isPermaLink="false">/?p=924#comment-3252</guid>
		<description>If you&#039;re asking how, for a known row index, you retrieve a property of the object represented in that row, you could (IIRC) do:

[[[myArrayController arrangedObjects] objectAtIndex: row] valueForKey: @&quot;myKey&quot;];

I often find myself having an outlet to the NSArrayController that feeds my tables.</description>
		<content:encoded><![CDATA[<p>If you're asking how, for a known row index, you retrieve a property of the object represented in that row, you could (IIRC) do:</p>
<p>[[[myArrayController arrangedObjects] objectAtIndex: row] valueForKey: @"myKey"];</p>
<p>I often find myself having an outlet to the NSArrayController that feeds my tables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/comment-page-1/#comment-3251</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 19 Nov 2004 19:12:52 +0000</pubDate>
		<guid isPermaLink="false">/?p=924#comment-3251</guid>
		<description>Erik, if that&#039;s not the case, how do you, for example, call -tableView:objectValueForTableColumn:row: on the datasource of a table that&#039;s fed by bindings?</description>
		<content:encoded><![CDATA[<p>Erik, if that's not the case, how do you, for example, call -tableView:objectValueForTableColumn:row: on the datasource of a table that's fed by bindings?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik J. Barzeski</title>
		<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/comment-page-1/#comment-3250</link>
		<dc:creator>Erik J. Barzeski</dc:creator>
		<pubDate>Fri, 19 Nov 2004 18:54:47 +0000</pubDate>
		<guid isPermaLink="false">/?p=924#comment-3250</guid>
		<description>To quote a friend... &quot;It&#039;s funny how people somehow think there&#039;s a special &#039;bindings&#039; version of NSTableView or something which prevents you from doing normal things.&quot;</description>
		<content:encoded><![CDATA[<p>To quote a friend... "It's funny how people somehow think there's a special 'bindings' version of NSTableView or something which prevents you from doing normal things."</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Buzz Andersen</title>
		<link>http://mjtsai.com/blog/2004/11/19/cocoa-bindings/comment-page-1/#comment-3249</link>
		<dc:creator>Buzz Andersen</dc:creator>
		<pubDate>Fri, 19 Nov 2004 18:43:42 +0000</pubDate>
		<guid isPermaLink="false">/?p=924#comment-3249</guid>
		<description>This has been my experience exactly.  As I&#039;ve tried to use bindings, I&#039;ve found some situations (such as preferences) where they are a huge win, and other situations where they would seem to complicate things needlessly.  Cocoalicious uses bindings in several places, but uses the standard tableview delegate methods.</description>
		<content:encoded><![CDATA[<p>This has been my experience exactly.  As I've tried to use bindings, I've found some situations (such as preferences) where they are a huge win, and other situations where they would seem to complicate things needlessly.  Cocoalicious uses bindings in several places, but uses the standard tableview delegate methods.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
