<?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: NSViewController, the New C in MVC - Pt. 2 of 3</title>
	<atom:link href="http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/</link>
	<description>Developing Interfaces with Cocoa</description>
	<pubDate>Fri, 19 Mar 2010 19:39:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Heignee</title>
		<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/#comment-350</link>
		<dc:creator>Heignee</dc:creator>
		<pubDate>Thu, 15 Oct 2009 00:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://katidev.com/blog/?p=109#comment-350</guid>
		<description>Человек никогда не реализует всех своих возможностей, пока прикован к земле. Мы должны взлететь и покорить небеса.</description>
		<content:encoded><![CDATA[<p>Человек никогда не реализует всех своих возможностей, пока прикован к земле. Мы должны взлететь и покорить небеса.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre Bernard</title>
		<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/#comment-348</link>
		<dc:creator>Pierre Bernard</dc:creator>
		<pubDate>Wed, 07 Oct 2009 22:03:31 +0000</pubDate>
		<guid isPermaLink="false">http://katidev.com/blog/?p=109#comment-348</guid>
		<description>I think it would be a good idea to take care of NSEditor too:

- (void)discardEditing
{
	[self.viewControllers makeObjectsPerformSelector:@selector(discardEditing)];
}

-(BOOL)commitEditing
{
	BOOL success = [super commitEditing];

	for (NSViewController *viewController in self.viewControllers) {
		success &#38;= [viewController commitEditing];
	}
	
	return success;
}</description>
		<content:encoded><![CDATA[<p>I think it would be a good idea to take care of NSEditor too:</p>
<p>- (void)discardEditing<br />
{<br />
	[self.viewControllers makeObjectsPerformSelector:@selector(discardEditing)];<br />
}</p>
<p>-(BOOL)commitEditing<br />
{<br />
	BOOL success = [super commitEditing];</p>
<p>	for (NSViewController *viewController in self.viewControllers) {<br />
		success &amp;= [viewController commitEditing];<br />
	}</p>
<p>	return success;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre Bernard</title>
		<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/#comment-347</link>
		<dc:creator>Pierre Bernard</dc:creator>
		<pubDate>Wed, 07 Oct 2009 22:02:37 +0000</pubDate>
		<guid isPermaLink="false">http://katidev.com/blog/?p=109#comment-347</guid>
		<description>You should override the designated initializer:

- (id)initWithWindow:(NSWindow *)window;
{
	if (![super initWithWindow:window])
		return nil;
	self.viewControllers = [NSMutableArray array];
	return self;
}</description>
		<content:encoded><![CDATA[<p>You should override the designated initializer:</p>
<p>- (id)initWithWindow:(NSWindow *)window;<br />
{<br />
	if (![super initWithWindow:window])<br />
		return nil;<br />
	self.viewControllers = [NSMutableArray array];<br />
	return self;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Beaver</title>
		<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/#comment-270</link>
		<dc:creator>Greg Beaver</dc:creator>
		<pubDate>Fri, 19 Dec 2008 03:50:37 +0000</pubDate>
		<guid isPermaLink="false">http://katidev.com/blog/?p=109#comment-270</guid>
		<description>Hi,

I'm trying to implement an application that will allow creating an arbitrary number of chamber music groups using nested collection views (a collection of views for each group, and also a collection of views for each member of the group), and so was thinking of using an NSViewController to contain the collection view information.  The nested view seems to match the design principles of XSViewController well.

However, I am using Core Data, and cannot figure out how to integrate the two.  A simple example application with NSPersistentDocument and XSViewController would be extremely helpful to me.  I need to somehow get the managedObjectContext passed into the child XIB files.

Needless to say, I'm relatively new to Mac development, my previous expertise is in PHP and C.  The first Mac app I wrote is a programmable metronome, which my quartet used to learn Elliiot Carter's 4th string quartet.

Any help is appreciated.  The program will be used to put groups together each week at a summer music program, and detect conflicts in both group members, repertoire, and scheduling.  The current program I am porting is based on an AJAX javascript/PHP/mysql system, but Core Data document-based is a better fit for this application.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m trying to implement an application that will allow creating an arbitrary number of chamber music groups using nested collection views (a collection of views for each group, and also a collection of views for each member of the group), and so was thinking of using an NSViewController to contain the collection view information.  The nested view seems to match the design principles of XSViewController well.</p>
<p>However, I am using Core Data, and cannot figure out how to integrate the two.  A simple example application with NSPersistentDocument and XSViewController would be extremely helpful to me.  I need to somehow get the managedObjectContext passed into the child XIB files.</p>
<p>Needless to say, I&#8217;m relatively new to Mac development, my previous expertise is in PHP and C.  The first Mac app I wrote is a programmable metronome, which my quartet used to learn Elliiot Carter&#8217;s 4th string quartet.</p>
<p>Any help is appreciated.  The program will be used to put groups together each week at a summer music program, and detect conflicts in both group members, repertoire, and scheduling.  The current program I am porting is based on an AJAX javascript/PHP/mysql system, but Core Data document-based is a better fit for this application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cathy</title>
		<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/#comment-245</link>
		<dc:creator>Cathy</dc:creator>
		<pubDate>Mon, 27 Oct 2008 16:10:02 +0000</pubDate>
		<guid isPermaLink="false">http://katidev.com/blog/?p=109#comment-245</guid>
		<description>hahaha, thanks :)</description>
		<content:encoded><![CDATA[<p>hahaha, thanks <img src='http://katidev.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Karlsson</title>
		<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/#comment-244</link>
		<dc:creator>Daniel Karlsson</dc:creator>
		<pubDate>Mon, 27 Oct 2008 16:03:16 +0000</pubDate>
		<guid isPermaLink="false">http://katidev.com/blog/?p=109#comment-244</guid>
		<description>Thanks for great blog posts and making the code open source.

There is a typo in the Copyright text," Conrtollers". 
'For example, "Contains "View Conrtollers" by Jonathan Dann and Cathy Shive" will do.' I was kinda tempted to use that exact spelling in my software :-).</description>
		<content:encoded><![CDATA[<p>Thanks for great blog posts and making the code open source.</p>
<p>There is a typo in the Copyright text,&#8221; Conrtollers&#8221;.<br />
&#8216;For example, &#8220;Contains &#8220;View Conrtollers&#8221; by Jonathan Dann and Cathy Shive&#8221; will do.&#8217; I was kinda tempted to use that exact spelling in my software :-).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Abdullah</title>
		<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/#comment-241</link>
		<dc:creator>Mike Abdullah</dc:creator>
		<pubDate>Fri, 10 Oct 2008 12:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://katidev.com/blog/?p=109#comment-241</guid>
		<description>Awesome, thanks Cathy! I must have missed that post when it was made.</description>
		<content:encoded><![CDATA[<p>Awesome, thanks Cathy! I must have missed that post when it was made.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cathy</title>
		<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/#comment-240</link>
		<dc:creator>cathy</dc:creator>
		<pubDate>Fri, 10 Oct 2008 11:26:17 +0000</pubDate>
		<guid isPermaLink="false">http://katidev.com/blog/?p=109#comment-240</guid>
		<description>Hi Mike, 

I explained the decision a little more in a recent post:&lt;a href="http://katidev.com/blog/2008/07/24/simple-nsviewcontroller-sample-projects/" rel="nofollow"&gt;Simple NSViewController Sample Projects&lt;/a&gt; - towards the end of the page. 

:)</description>
		<content:encoded><![CDATA[<p>Hi Mike, </p>
<p>I explained the decision a little more in a recent post:<a href="http://katidev.com/blog/2008/07/24/simple-nsviewcontroller-sample-projects/" rel="nofollow">Simple NSViewController Sample Projects</a> - towards the end of the page. </p>
<p> <img src='http://katidev.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Abdullah</title>
		<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/#comment-239</link>
		<dc:creator>Mike Abdullah</dc:creator>
		<pubDate>Fri, 10 Oct 2008 11:17:27 +0000</pubDate>
		<guid isPermaLink="false">http://katidev.com/blog/?p=109#comment-239</guid>
		<description>Clearly this is a loooong time after the original post, but having re-stumbled upon it, I have a question:

What were your reasons for choosing to implement the responder chain such that the view controllers are inserted around the level of the window controller? UIKit takes the approach that each view controller is inserted in between the view it manages and the superview.

I can see the pros and cons of both and wondered why you chose this design over the other. Or indeed, if there was even a third design considered?</description>
		<content:encoded><![CDATA[<p>Clearly this is a loooong time after the original post, but having re-stumbled upon it, I have a question:</p>
<p>What were your reasons for choosing to implement the responder chain such that the view controllers are inserted around the level of the window controller? UIKit takes the approach that each view controller is inserted in between the view it manages and the superview.</p>
<p>I can see the pros and cons of both and wondered why you chose this design over the other. Or indeed, if there was even a third design considered?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/#comment-205</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 06 Jun 2008 15:45:20 +0000</pubDate>
		<guid isPermaLink="false">http://katidev.com/blog/?p=109#comment-205</guid>
		<description>Speaking of representedObject -- it's worth noting that default setRepresentedObject implementation in NSViewController (not suprisingly) retains the object. So if you use it to represent your document (NSDocument) subclass you end up with circular references/leak.</description>
		<content:encoded><![CDATA[<p>Speaking of representedObject &#8212; it&#8217;s worth noting that default setRepresentedObject implementation in NSViewController (not suprisingly) retains the object. So if you use it to represent your document (NSDocument) subclass you end up with circular references/leak.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.119 seconds -->
