<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title> (Entries tagged as news)</title>
    <link>http://www.digitalenginesoftware.com/blog/</link>
    <description></description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.3-2 - http://www.s9y.org/</generator>
    <webMaster>webmaster@digitalenginesoftware.com</webMaster>
<pubDate>Thu, 17 Nov 2011 22:11:56 GMT</pubDate>

    <image>
        <url>http://www.digitalenginesoftware.com/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS:  - </title>
        <link>http://www.digitalenginesoftware.com/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>State of the Company – Now Closed</title>
    <link>http://www.digitalenginesoftware.com/blog/archives/77-State-of-the-Company-Now-Closed.html</link>
    
    <comments>http://www.digitalenginesoftware.com/blog/archives/77-State-of-the-Company-Now-Closed.html#comments</comments>
    <wfw:comment>http://www.digitalenginesoftware.com/blog/wfwcomment.php?cid=77</wfw:comment>

    <wfw:commentRss>http://www.digitalenginesoftware.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=77</wfw:commentRss>
    

    <author>nospam@example.com (Kevin Locke)</author>
    <content:encoded>
    &lt;p&gt;I am sorry to inform you that Digital Engine Software is no more.  Priorities change, new opportunities arise, and we have decided to take advantage of them.  Peter landed an amazing job working for &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/riotgames.com/&#039;]);&quot;  href=&quot;http://riotgames.com/&quot;&gt;Riot Games&lt;/a&gt; in Southern California, Mike is pursuing his Masters in Economics at the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.uvm.edu/&#039;]);&quot;  href=&quot;http://www.uvm.edu/&quot;&gt;University of Vermont&lt;/a&gt;, and I am currently finishing the remaining obligations for Digital Engine Software with exciting opportunities on the horizon.&lt;br /&gt;&lt;br /&gt;
It has been a privilege working with Mike and Peter, and with all of our clients and business partners.  It has also been a great enjoyment, both during work and engaging with all of you outside of work, particularly at our LAN events.  I wish Mike and Peter the best of luck in their pursuits and I look forward to seeing you all wherever our paths may cross.&lt;br /&gt;&lt;br /&gt;
I will continue to be reachable through &lt;a href=&quot;/contact.xhtml&quot;&gt;all of the usual methods&lt;/a&gt; for the foreseeable future to answer any questions and address any issues (both Digital Engine-related and otherwise).  It has been a great run and I expect a lot more greatness from everyone involved in the years to come.  Farewell Digital Engine Software.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 17 Nov 2011 11:03:00 -0700</pubDate>
    <guid isPermaLink="false">http://www.digitalenginesoftware.com/blog/archives/77-guid.html</guid>
    <category>news</category>

</item>
<item>
    <title>State of the Company – Spring Time Happy Days</title>
    <link>http://www.digitalenginesoftware.com/blog/archives/69-State-of-the-Company-Spring-Time-Happy-Days.html</link>
    
    <comments>http://www.digitalenginesoftware.com/blog/archives/69-State-of-the-Company-Spring-Time-Happy-Days.html#comments</comments>
    <wfw:comment>http://www.digitalenginesoftware.com/blog/wfwcomment.php?cid=69</wfw:comment>

    <wfw:commentRss>http://www.digitalenginesoftware.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=69</wfw:commentRss>
    

    <author>nospam@example.com (Mike Archer)</author>
    <content:encoded>
    &lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:&quot;Table Normal&quot;;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:&quot;&quot;;
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:&quot;Times New Roman&quot;;
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt; 
&lt;p class=&quot;MsoNormal&quot;&gt;I&#039;ve been slacking on state of the company updates because
I&#039;m a slacker.&lt;br /&gt; &lt;br /&gt;
What We Have Been Up To:&lt;br /&gt; &lt;br /&gt;
Peter has been working really hard on the heat mapping software we are making
for NWB Sensors. The software can now record at 1 FPS (I&#039;m told it will go up
to 7 FPS if Sandra Bullock and Keaneu Reeves are using it). The software also
keeps track of GPS coordinates which are some of the best coordinates to keep
track of. If you need a top-of-the-line heat imaging setup using Flir Tau or
Photon cameras and rad software from Digital Engine give Paul or any of the
other NWB Sensors guys a call at 406.579.0510.&lt;/p&gt; 
&lt;p class=&quot;MsoNormal&quot;&gt;
I have been putting together a web site for NWB Sensors which will be up as
soon as they decide on a sufficiently cool URL. I have also been “helping” out
at the social media user&#039;s group (SMUG) classes that the TechRanch has been
hosting. We just finished with the beginner sessions so going forward there
will be a class about once a month on various social media topics. Laura Rhodes
has been doing a wonderful job putting these on so if you&#039;re interested drop
by, you can find a schedule on the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/techranch.org/our-events.php?calendar-id=505774422&amp;amp;amp;year=0&amp;amp;amp;month=0&amp;amp;amp;day=0#&#039;]);&quot;  href=&quot;http://techranch.org/our-events.php?calendar-id=505774422&amp;amp;year=0&amp;amp;month=0&amp;amp;day=0#&quot;&gt;TechRanch website&lt;/a&gt;. Finally I am finishing up
an idea we were tossing around the office – a Facebook application to trade and
price your friends on a stock market. &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/apps.facebook.com/braintrolley&#039;]);&quot;  href=&quot;http://apps.facebook.com/braintrolley&quot;&gt;Brain Trolley Trader&lt;/a&gt; is in beta right now
so come and try it out!&lt;/p&gt; 
&lt;p class=&quot;MsoNormal&quot;&gt;Kevin has been working on additions to the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/openwrt.org/&#039;]);&quot;  href=&quot;http://openwrt.org/&quot;&gt;OpenWrt&lt;/a&gt; router
firmware to enable VPN with IPsec connections. The functionality is all there
and working as of a couple of days ago, woohoo Kevin! Kevin is now working on
making the setup process a little more user friendly. The patches have been submitted
to the OpenWrt project so be on the lookout for the updates to be committed in
the near future. We have also been tossing around the idea of offering pre-loaded
and configured routers for sale. I will definitely make it known if or when that
happens.&lt;/p&gt; 
&lt;p class=&quot;MsoNormal&quot;&gt;We have also held two LAN parties since my last update. We
have had around 30 people at each which has been amazing! Unfortunately we are
really pushing the limits of the library’s electrical system so if we get too
many more people we may have to start looking for a new venue.&amp;#160; &lt;span&gt;If anyone has any good and cheap suggestions please drop me an &lt;a href=&quot;mailto:%20marcher@digitalenginesoftware.com&quot;&gt;e-mail&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; 
&lt;p class=&quot;MsoNormal&quot;&gt;That is all for this month, happy Spring!&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 22 Mar 2011 14:17:29 -0600</pubDate>
    <guid isPermaLink="false">http://www.digitalenginesoftware.com/blog/archives/69-guid.html</guid>
    <category>news</category>

</item>
<item>
    <title>LAN Party</title>
    <link>http://www.digitalenginesoftware.com/blog/archives/62-LAN-Party.html</link>
    
    <comments>http://www.digitalenginesoftware.com/blog/archives/62-LAN-Party.html#comments</comments>
    <wfw:comment>http://www.digitalenginesoftware.com/blog/wfwcomment.php?cid=62</wfw:comment>

    <wfw:commentRss>http://www.digitalenginesoftware.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=62</wfw:commentRss>
    

    <author>nospam@example.com (Mike Archer)</author>
    <content:encoded>
    
&lt;p&gt;Digital Engine Software is proud to host our fourth LAN party of 
the year on February 5th from 1:00 p.m. to 10:00 p.m. at the Bozeman Public Library. We&#039;ll be playing some StarCraft 2, UT 2004, Quake 3, Team 
Fortress 2, Counter-Strike: Source, Left4Dead 2 and anything else that 
happens to strike our fancy. Drinks and snacks will be provided and 
we&#039;ll take pizza orders come dinner time. Admission is free and everyone
 is welcome.

For more information visit:&lt;br /&gt;
&lt;br /&gt;
Our website: &lt;a href=&quot;http://www.digitalenginesoftware.com/lan/&quot;&gt;http://www.digitalenginesoftware.com/lan/&lt;/a&gt;&lt;br /&gt;
Our Facebook group: &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.facebook.com/#!/group.php?gid=102202183163875&#039;]);&quot;  href=&quot;http://www.facebook.com/#!/group.php?gid=102202183163875&quot;&gt;http://www.facebook.com/#!/group.php?gid=102202183163875&lt;/a&gt;&lt;br /&gt;
Or e-mail: &lt;a href=&quot;mailto: marcher@digitalenginesoftware.com&quot;&gt;marcher@digitalenginesoftware.com&lt;/a&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sat, 29 Jan 2011 20:45:44 -0700</pubDate>
    <guid isPermaLink="false">http://www.digitalenginesoftware.com/blog/archives/62-guid.html</guid>
    <category>news</category>

</item>
<item>
    <title>SotC November Style.</title>
    <link>http://www.digitalenginesoftware.com/blog/archives/57-SotC-November-Style..html</link>
    
    <comments>http://www.digitalenginesoftware.com/blog/archives/57-SotC-November-Style..html#comments</comments>
    <wfw:comment>http://www.digitalenginesoftware.com/blog/wfwcomment.php?cid=57</wfw:comment>

    <wfw:commentRss>http://www.digitalenginesoftware.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=57</wfw:commentRss>
    

    <author>nospam@example.com (Mike Archer)</author>
    <content:encoded>
    &lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:&quot;Table Normal&quot;;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:&quot;&quot;;
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:&quot;Times New Roman&quot;;
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Another super exciting month for us here at Digital Engine
Software. Ok, maybe not super exciting but marginally above average! Let’s see…beginning
of the month we had our third LAN party of the year. It was a lot of fun, I got
to play grownup Lego’s quite a bit (&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/minecraft.net&#039;]);&quot;  href=&quot;http://minecraft.net&quot;&gt;Minecraft&lt;/a&gt;) and Peter laughed all the way to
the bank whooping it up on LoL (&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.leagueoflegends.com&#039;]);&quot;  href=&quot;http://www.leagueoflegends.com&quot;&gt;League of Legends&lt;/a&gt;). We also attended the Tech
Ranch networking party at the 317 Pub.&lt;span&gt; 
&lt;/span&gt;Having been to a whole two networking events with the Tech Ranch I can
authoritatively state that they are all awesome.&lt;span&gt;  &lt;/span&gt;You get to meet some really interesting
people, talk about some cool stuff and usually there is free food/drink. Which
brings me to my starving entrepreneur tip of the day: There are a surprisingly
large number of events in this town that just give away food.&lt;span&gt;  &lt;/span&gt;A lot of the time it is even good food (even
assuming you haven’t eaten Ramen for the last 12 meals). Attend these
events.&lt;span&gt;  &lt;/span&gt;You will meet some people
(sometimes cool) and you may be able to sneak out some food. &lt;span&gt; &lt;/span&gt;Mix your stolen food with Ramen the next day
and you can eat like a king! &lt;span&gt; &lt;/span&gt;I call it
Fancy Ramen ™.&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;As far as actual work goes just some more of the same.&lt;span&gt;  &lt;/span&gt;I have been finalizing some of the web
projects I have been working on and trying to develop a solid marketing plan
for whenever Peter thinks of his name for the Git GUI project. Peter, ironically,
has been working on the Git GUI project and Kevin has been working on his
office management software along with a nearly fully-functional demo for a
secret project we’ll hopefully be able to discuss sometime soon. Kevin has also
submitted his patch to the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/duplicity.nongnu.org/&#039;]);&quot;  href=&quot;http://duplicity.nongnu.org/&quot;&gt;Duplicity project&lt;/a&gt; to be merged with the main
development branch so theoretically Duplicity will have a Window’s port (and a
lot of bug fixes) available soon. A social media users group is in the works at
the Tech Ranch. The first meeting should take place before the end of the year.
Keep an eye on our blog or the Tech Ranch calendar for the official date. More
next month!&lt;/p&gt;


 
    </content:encoded>

    <pubDate>Wed, 03 Nov 2010 15:34:10 -0600</pubDate>
    <guid isPermaLink="false">http://www.digitalenginesoftware.com/blog/archives/57-guid.html</guid>
    <category>news</category>

</item>
<item>
    <title>The Curious Case of OBJC_DISABLE_GC in OCUnit tests</title>
    <link>http://www.digitalenginesoftware.com/blog/archives/56-The-Curious-Case-of-OBJC_DISABLE_GC-in-OCUnit-tests.html</link>
            <category>Software Development</category>
    
    <comments>http://www.digitalenginesoftware.com/blog/archives/56-The-Curious-Case-of-OBJC_DISABLE_GC-in-OCUnit-tests.html#comments</comments>
    <wfw:comment>http://www.digitalenginesoftware.com/blog/wfwcomment.php?cid=56</wfw:comment>

    <wfw:commentRss>http://www.digitalenginesoftware.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=56</wfw:commentRss>
    

    <author>nospam@example.com (Peter Nix)</author>
    <content:encoded>
    &lt;p&gt;When I first started writing unit tests using the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.sente.ch/software/ocunit/&#039;]);&quot;  href=&quot;http://www.sente.ch/software/ocunit/&quot;&gt;OCUnit&lt;/a&gt; testing framework, my unit tests were failing when I ran them, but when I set break points to debug them they started passing. It turned out, after much swearing and frustration, that there were errors being spewed to the standard error file handle. This error looked a little something like this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;GC: forcing GC OFF because OBJC_DISABLE_GC is set&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Normally this wouldn&#039;t be a big deal, and my application at it core relies on reading messages from both standard out and standard error as part of communicating with an NSTask object. I&#039;m using &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/regexkit.sourceforge.net/&#039;]);&quot;  href=&quot;http://regexkit.sourceforge.net/&quot;&gt;RegexKit&lt;/a&gt; in order to parse the output into a meaningful set of data, and that&#039;s where the problem manifests itself. Since this error is coming from the unit testing harness and my regex&#039;s are not expecting this error message in the standard error file handle, this led to failed unit tests.&lt;/p&gt;

&lt;p&gt;Naturally, I immediately started googling for the answer, and read posts every from &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.cocoabuilder.com/&#039;]);&quot;  href=&quot;http://www.cocoabuilder.com/&quot;&gt;CocoaBuilder&lt;/a&gt; to &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.stackoverflow.com&#039;]);&quot;  href=&quot;http://www.stackoverflow.com&quot;&gt;StackOverflow&lt;/a&gt;, and everyone suggested to change the Garbage Collection behavior from Unsupported to either Supported or Required. Easy enough, and so I did, in these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Double click on the project at the top of the project browser&lt;/li&gt;
&lt;/ul&gt;

&lt;div style=&quot;margin-left: 5ex&quot;&gt;&lt;img width=&quot;271&quot; height=&quot;191&quot;  src=&quot;http://www.digitalenginesoftware.com/blog/uploads/peter/OBJC_project_highlight.jpg&quot;  alt=&quot;Image of the project highlighted in sidebar&quot; /&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Find the garbage collection setting&lt;/li&gt;
&lt;/ul&gt;

&lt;div style=&quot;margin-left: 5ex&quot;&gt;&lt;img src=&quot;http://www.digitalenginesoftware.com/blog/uploads/peter/OBJC_Project_GC.jpg&quot; alt=&quot;Image of garbage typed into search box&quot; /&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Change the value to either supported or required (supported in my case, as I&#039;m actually using the retain count method)&lt;/li&gt;
&lt;/ul&gt;

&lt;div style=&quot;margin-left: 5ex&quot;&gt;&lt;img src=&quot;http://www.digitalenginesoftware.com/blog/uploads/peter/OBJC_GC_settings.jpg&quot; alt=&quot;GC settings drop-down menu&quot; /&gt;&lt;/div&gt;

&lt;p&gt;Done and done...or so I thought. I ran my unit test again, and I continued to get the same error message. I switched the garbage collection setting to the other value (required in my case) and still I continued to get the error message.&lt;/p&gt;

&lt;p&gt;So, I went back on the hunt for the answer and the same answer came up again and again, &quot;Switch your garbage collection setting&quot;, which was not solving my problem. In the end, I did end up solving my problem and the answer is indeed &quot;switch your garbage collection setting&quot; but one thing no one told me, and I&#039;m here to tell everyone having the same problem as I was having, is exactly WHICH garbage collection setting to change.&lt;/p&gt;

&lt;p&gt;The secret it turns out is that the Unit Test Bundle has its &lt;em&gt;own&lt;/em&gt; garbage collection setting, and its not inherited from the project level setting. &lt;/p&gt;

&lt;p&gt;So, instead of double click on the project, double click &lt;em&gt;HERE&lt;/em&gt;:&lt;/p&gt;

&lt;div style=&quot;margin-left: 5ex&quot;&gt;&lt;img src=&quot;http://www.digitalenginesoftware.com/blog/uploads/peter/OBJC_bundle_highlight.jpg&quot; alt=&quot;Test Bundle highlighted in the sidebar&quot; /&gt;&lt;/div&gt;

&lt;p&gt;and change that garbage collection setting to either Supported or Required, per normal:&lt;/p&gt;

&lt;div style=&quot;margin-left: 5ex&quot;&gt;&lt;img src=&quot;http://www.digitalenginesoftware.com/blog/uploads/peter/OBJC_test_bundle_GC.jpg&quot; alt=&quot;Garbage typed into search box of settings page&quot; /&gt;&lt;/div&gt;

&lt;p&gt;The instant I changed the unit test bundle&#039;s setting, the errors in standard out that I&#039;m not expecting are gone.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Wed, 20 Oct 2010 15:07:10 -0600</pubDate>
    <guid isPermaLink="false">http://www.digitalenginesoftware.com/blog/archives/56-guid.html</guid>
    <category>garbage collection</category>
<category>news</category>
<category>objective-c</category>
<category>unit test</category>
<category>xcode</category>

</item>
<item>
    <title>The proper care and feeding of NSWindow objects display as a sheet</title>
    <link>http://www.digitalenginesoftware.com/blog/archives/54-The-proper-care-and-feeding-of-NSWindow-objects-display-as-a-sheet.html</link>
            <category>Software Development</category>
    
    <comments>http://www.digitalenginesoftware.com/blog/archives/54-The-proper-care-and-feeding-of-NSWindow-objects-display-as-a-sheet.html#comments</comments>
    <wfw:comment>http://www.digitalenginesoftware.com/blog/wfwcomment.php?cid=54</wfw:comment>

    <wfw:commentRss>http://www.digitalenginesoftware.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=54</wfw:commentRss>
    

    <author>nospam@example.com (Peter Nix)</author>
    <content:encoded>
    &lt;h2&gt;
The Too Long, Didn&#039;t Read version: 
&lt;/h2&gt;
&lt;p&gt;
Displaying a NSWindow, one that&#039;s lazily loaded from its own nib file, as a sheet doesn&#039;t have a any method for notifying observers that its about to be displayed, and therefore its difficult to reset the sheet UI on the second and later displays. Therefore, use this &lt;a href=&quot;#sheetcontroller&quot;&gt;NSWindow subclass&lt;/a&gt; as your controller to re-set the UI right before the window will display as a sheet.
&lt;/p&gt;
&lt;p&gt;
---
&lt;/p&gt;
&lt;h2&gt;
The long version wherein I lead the reader, step by step, through the problem and the solution to lazily-loaded, re-usable NSWindow objects displayed as a sheet:
&lt;/h2&gt;
&lt;p&gt;
In many examples of using custom NSWindow object displays as a sheet in a Cocoa application, found both on the web and in print, the author has placed the NSWindow object that will be used as a sheet inside in the .nib file of the window that the sheet will be attached to. This works fine if the sheet is guaranteed to be displayed to the user. On the other hand if you can&#039;t guarantee that the user will see the sheet, as you frequently cannot with a sheet, including the sheet in the nib file violates the guideline of &quot;For a window or menu that is used only occasionally, store it in a separate nib file. By storing it in a separate nib file, you load the resource into memory only if it is actually used.&quot;
&lt;/p&gt;
&lt;p&gt;
As a tangential discussion before diving into the main point, everytime you load a resource from a nib file all objects contained within the file, with the exception of the &#039;File&#039;s Owner&#039;, &#039;First Responder&#039; and &#039;Application&#039; objects since these are proxy objects, are unarchived and have their connections (both IBAction and IBOutlets) set up. Therefore, even if you don&#039;t use a particular resource contained with in the nib, such as in the case where the sheet is never presented to the user, the program has wasted both computation time and memory loading all the unused objects anyway. The more you can get away with not loading from your nib files, the faster your program will launch and the more memory efficient it will be while running. As such, the best way to handle NSWindow objects that may not be displayed to the user is to move them into their own nib file and only load them from the nib file when, and if, they need to be displayed to the user. For a more complete run down of the ins and outs of nib files please read through &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/developer.apple.com/library/mac/#documentation/cocoa/conceptual/LoadingResources/CocoaNibs/CocoaNibs.html%23//apple_ref/doc/uid/10000051i-CH4-SW8&#039;]);&quot;  href=&quot;http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/LoadingResources/CocoaNibs/CocoaNibs.html%23//apple_ref/doc/uid/10000051i-CH4-SW8&quot;&gt;Apple&#039;s Resource Programming Guide&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
So, in the case of a custom sheet, since we don&#039;t want to waste processing time and system memory until we need it, the best way to handle this is as follows. I&#039;m purposefully omitting the corresponding .h files for this example since they&#039;re rather trivial. The only important part is that both MainWindowController and SheetController are both subclasses of NSWindowController:
&lt;/p&gt;
&lt;em&gt;MainWindowController.m&lt;/em&gt;
&lt;div class=&quot;objc geshi&quot; style=&quot;text-align: left&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;IBAction&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;displaySheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;sender &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; SheetController&lt;span style=&quot;color: #002200;&quot;&gt;*&lt;/span&gt; sheetController &lt;span style=&quot;color: #002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;SheetController alloc&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; init&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;NSApp beginSheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;sheetController window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; modalForWindow&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;self window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; modalDelegate&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;self &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; didEndSelector&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;@selector&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;sheetDidEnd&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;returnCode&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;contextInfo&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; contextInfo&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;sheetController&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;sheetDidEnd&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAlert_Class/&#039;]);&quot;  href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAlert_Class/&quot;&gt;&lt;span style=&quot;color: #400080;&quot;&gt;NSAlert&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #002200;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;alert returnCode&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;NSInteger&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;returnCode &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; contextInfo&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;contextInfo &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;// do something with the user input to the sheet here&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; SheetController&lt;span style=&quot;color: #002200;&quot;&gt;*&lt;/span&gt; sheetController &lt;span style=&quot;color: #002200;&quot;&gt;=&lt;/span&gt; contextInfo;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;sheetController release&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;em&gt;SheetController.m&lt;/em&gt;
&lt;div class=&quot;objc geshi&quot; style=&quot;text-align: left&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;init &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self &lt;span style=&quot;color: #002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;super initWithWindowNibName&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #bf1d1a;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #bf1d1a;&quot;&gt;&amp;quot;someSheet&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #a61390;&quot;&gt;return&lt;/span&gt; self;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;IBAction&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;dimissSheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;sender &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;NSApp endSheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;self window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; returnCode&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;NSOKButton&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;self window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; orderOut&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;self&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;
This is just sample code, with just enough to show how displaying a sheet would work. Obviously it will work, but there&#039;s a subtle error in here that&#039;s easy to miss for new programmers. Everytime &lt;code&gt;[[SheetController alloc] init]&lt;/code&gt; is called in the main window controller, the contents of the nib containing the sheet is opened, unpacked, and hydrated. Even though we&#039;re properly lazily loading the objects in the nib file, we&#039;ve committed another error. We&#039;re now incurring the nib loading everytime the sheet displays. It would be better if we could unpack this information from the nib only once, and reuse the sheet NSWindow object every time and therefore we only incur the cost of instantiation the first time a user needs the sheet.
&lt;/p&gt;
&lt;p&gt;
Easy enough, in theory (you&#039;ll see why this turns out to be harder than it looks in a second), and with that change it looks something like this:
&lt;/p&gt;
&lt;em&gt;MainWindowController.h&lt;/em&gt;
&lt;div class=&quot;objc geshi&quot; style=&quot;text-align: left&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #a61390;&quot;&gt;@interface&lt;/span&gt; MainWindowController &lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt; &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindowController_Class/&#039;]);&quot;  href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindowController_Class/&quot;&gt;&lt;span style=&quot;color: #400080;&quot;&gt;NSWindowController&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; SheetController&lt;span style=&quot;color: #002200;&quot;&gt;*&lt;/span&gt; sheetController;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; ...&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #a61390;&quot;&gt;@end&lt;/span&gt;&lt;/div&gt;
&lt;em&gt;MainWindowController.m&lt;/em&gt;
&lt;div class=&quot;objc geshi&quot; style=&quot;text-align: left&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;IBAction&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;displaySheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;sender &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #a61390;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;sheetController &lt;span style=&quot;color: #002200;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #a61390;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; sheetController &lt;span style=&quot;color: #002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;SheetController alloc&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; init&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;NSApp beginSheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;sheetController window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; modalForWindow&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;self window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; modalDelegate&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;self &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; didEndSelector&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;@selector&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;sheetDidEnd&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;returnCode&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;contextInfo&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; contextInfo&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;sheetController&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;sheetDidEnd&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAlert_Class/&#039;]);&quot;  href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAlert_Class/&quot;&gt;&lt;span style=&quot;color: #400080;&quot;&gt;NSAlert&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #002200;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;alert returnCode&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;NSInteger&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;returnCode &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; contextInfo&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;contextInfo &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;// do something with the user input to the sheet here&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;em&gt;SheetController.m&lt;/em&gt;
&lt;div class=&quot;objc geshi&quot; style=&quot;text-align: left&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;init &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self &lt;span style=&quot;color: #002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;super initWithWindowNibName&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #bf1d1a;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #bf1d1a;&quot;&gt;&amp;quot;someSheet&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #a61390;&quot;&gt;return&lt;/span&gt; self;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;IBAction&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;dimissSheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;sender &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;NSApp endSheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;self window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; returnCode&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;NSOKButton&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;self window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; orderOut&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;self&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
 &lt;p&gt;
Now, we&#039;re creating the sheet a single time, which fixes the problem of loading the resources from the nib every time you display the sheet, but introduces a new problem (one that&#039;s hard to see from the example code without running a full application that implements this code). The problem is that because we&#039;re using the exact same NSWindow object over and over, if the sheet contains UI elements that the user can change (NSTextField, NSSlider, NSPopupButton, etc.) then those UI elements will be displayed as the user left them from the first time they interacted with the sheet. Sometimes this is the desired behavior, but in the event that its not, you have a problem.
&lt;/p&gt;
&lt;p&gt;
Normally in the case where you want to re-use a window over and over and want to reset its UI every time its presented to the user, you can override the &lt;code&gt;- (IBAction)showWindow:(id)sender&lt;/code&gt; method in the NSWindowController. Unfortunately for a NSWindow displayed as a sheet, the &lt;code&gt;showWindow:&lt;/code&gt; method is not invoked by &lt;code&gt;[NSApp beginSheet:...]&lt;/code&gt; and therefore your NSWindowController subclass isn&#039;t notified that the window is about to be displayed. This lack of notification just prior to the window showing on screen as a sheet is the heart of the problem. As a quick rundown of the methods you might think work but don&#039;t:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When the sheet is loaded, it invokes &lt;code&gt;windowDidLoad:&lt;/code&gt; on its controller, but this only happens the first time its loaded from the nib and is never invoked again (since we&#039;re re-using the sheet and only loading it from the nib a single time), so it can&#039;t be used to reset the UI for the second display of the sheet.&lt;/li&gt;
&lt;li&gt;The NSWindow that will have a sheet attached to it notifies its delegate that its about to display a sheet through the &lt;code&gt;willDisplaySheet:(NSNotification*)&lt;/code&gt; method, but the notification contains a nil userInfo dictionary so it doesn&#039;t contain a pointer to the sheet its about to display&lt;/li&gt;
&lt;li&gt;You might think that when a window&#039;s delegate receives a &lt;code&gt;willDisplaySheet:&lt;/code&gt; notification the delegate could invoke the &lt;code&gt;attachedSheet&lt;/code&gt; method on the window that&#039;s about to display a sheet. Unfortunately, the NSWindow&#039;s &lt;code&gt;attachedSheet&lt;/code&gt; method returns &lt;code&gt;nil&lt;/code&gt; at this point since the sheet isn&#039;t yet attached.&lt;/li&gt;
&lt;li&gt;You could override &lt;code&gt;[controller window]&lt;/code&gt; method on the NSWindowController for the sheet in order to reset the UI before returning the window object. This partially works since you&#039;ll reset the UI as part of the &lt;code&gt;[NSApp beginSheet:[sheetController window] ...]&lt;/code&gt; invocation, but it also means you lose access to what the user did on the other side since dismissing the sheet through &lt;code&gt;[NSApp endSheet:[self window] ...]&lt;/code&gt; also resets the UI.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Since the last bullet point is half usable, it turns out that with the right tweaks, we can avoid restting the UI while dismissing the sheet. I now present the DESSheetController, which you can use in your own Xcode project to fix this issue:
&lt;/p&gt;
&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindowController_Class/&#039;]);&quot;  name=&quot;sheetcontroller&quot;&gt;&lt;/a&gt; 
&lt;em&gt;DESSheetController.h&lt;/em&gt;
&lt;div class=&quot;objc geshi&quot; style=&quot;text-align: left&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;// &amp;#160;DESSheetController.m&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;// &amp;#160;Created by Peter Nix (pnix@digitalenginesoftware.com)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #6e371a;&quot;&gt;#import &amp;lt;Cocoa/Cocoa.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;/*!&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;@class DESSheetController&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;@abstract An abstract super class to use instead of NSWindowController to &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; assist in using sheets.&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;@discussion Using an NSWindow controller loaded from its own nib as a sheet &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; (a distinct nib from the window its going to attach to) doesn&#039;t have a good &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; notification to its NSWindowController or delegate that its about to display. &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Therefore, it is very difficult to reset the UI to a default state when re-displaying &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; the sheet to the user. This class provides the necessary overrides and callbacks &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; to help reset the UI to a default state when reusing the same NSWindow &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; object as a sheet.&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;@updated 2010-10-13&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;*/&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #a61390;&quot;&gt;@interface&lt;/span&gt; DESSheetController &lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt; &lt;a href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindowController_Class/&quot;&gt;&lt;span style=&quot;color: #400080;&quot;&gt;NSWindowController&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;/*!&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;@abstract dismissSheet: provides a way of dismissing the sheet without losing &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; the information contained in the UI elements the user can interact with.&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;@discussion Based on the override of the window method (see the implementation &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; file) if you call [self window] as part of the call to dismiss the sheet, you will &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; reset the UI on the sheet before you query for this information in your modal &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; delegate&#039;s selector callback. Therefore, the contract for overriding this class &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; for a custom sheet controller is call this method when dismissing the sheet &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; in order to preserve the UI state.&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;@param returnCode the integer indicating the status that the sheet ended with. &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; This parameter will be passed onto NSApp when sending the sheet out and in &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; turn gets passed to the modal delegate&#039;s callback selector.&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;*/&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;dismissSheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;NSInteger&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;returnCode;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;/*!&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;@abstract This is the method that needs to be overriden in your custom subclass&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;in order to reset the UI when redisplaying the sheet.&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;@discussion This method is invoked in the middle of returning the window from &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; your controller to the NSApp instance to begin a sheet. Therefore this method&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;is invoked at (literally) the last possible moment, meaning that all the UI for &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; the sheet has been properly hydrated from the nib, and is just about to be &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; displayed as a sheet. This method is empty in this class, and is designed to be&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;overridden by a custom subclass in order to perform any UI clean up in order &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; to get the sheet into a reset/clean state for display to the user.&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;*/&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;hydrateView;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #a61390;&quot;&gt;@end&lt;/span&gt;&lt;/div&gt;
&lt;em&gt;DESSheetController.m&lt;/em&gt;
&lt;div class=&quot;objc geshi&quot; style=&quot;text-align: left&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #6e371a;&quot;&gt;#import &amp;quot;DESSheetController.h&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #a61390;&quot;&gt;@implementation&lt;/span&gt; DESSheetController&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #6e371a;&quot;&gt;#pragma mark inherited methods&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/&#039;]);&quot;  href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/&quot;&gt;&lt;span style=&quot;color: #400080;&quot;&gt;NSWindow&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #002200;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;window &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/&#039;]);&quot;  href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/&quot;&gt;&lt;span style=&quot;color: #400080;&quot;&gt;NSWindow&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #002200;&quot;&gt;*&lt;/span&gt; window &lt;span style=&quot;color: #002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;super window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;self hydrateView&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #a61390;&quot;&gt;return&lt;/span&gt; window;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #6e371a;&quot;&gt;#pragma mark private methods&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;hydrateView &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;// do nothing by design, overridden by sub-classes&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;dismissSheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;NSInteger&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;returnCode &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;// note the use of super instead of self in order to bypass the sheet reset code &lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;// via the hydrateView method&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;NSApp endSheet&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;super window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; returnCode&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;returnCode&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;super window&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; orderOut&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;self&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #a61390;&quot;&gt;@end&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;
So, now for a bit of explanation. The point is to use this class as your sheet controller&#039;s superclass instead of NSWindowController. By subclassing DESSheetController, all you have to do is implement &lt;code&gt;-(void)hydrateView&lt;/code&gt; within your subclass and use that method to re-initialize the UI everytime the sheet is displayed. On the outgoing side, the contract is to invoke the &lt;code&gt;- (void)dismissSheet:(NSInteger)returnCode&lt;/code&gt; method instead of invoking &lt;code&gt;[NSApp endSheet:]&lt;/code&gt; directly in your subclass. The &lt;code&gt;dismissSheet:&lt;/code&gt; method calls &lt;code&gt;[super window]&lt;/code&gt; instead of &lt;code&gt;[self window]&lt;/code&gt; and therefore avoids resetting the UI before the modal delegate can query the sheet for information.
&lt;/p&gt;
&lt;p&gt;
Now, you can safely re-use a single NSWindow as a custom sheet for user interaction over and over again, and still stick to lazy initialization and avoid multiple nib loading.
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Fri, 15 Oct 2010 10:12:55 -0600</pubDate>
    <guid isPermaLink="false">http://www.digitalenginesoftware.com/blog/archives/54-guid.html</guid>
    <category>news</category>
<category>nswindow</category>
<category>objective-c</category>
<category>sheet</category>
<category>xcode</category>

</item>
<item>
    <title>State of the Company October Edition</title>
    <link>http://www.digitalenginesoftware.com/blog/archives/53-State-of-the-Company-October-Edition.html</link>
    
    <comments>http://www.digitalenginesoftware.com/blog/archives/53-State-of-the-Company-October-Edition.html#comments</comments>
    <wfw:comment>http://www.digitalenginesoftware.com/blog/wfwcomment.php?cid=53</wfw:comment>

    <wfw:commentRss>http://www.digitalenginesoftware.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=53</wfw:commentRss>
    

    <author>nospam@example.com (Mike Archer)</author>
    <content:encoded>
    
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:&quot;Table Normal&quot;;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:&quot;&quot;;
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:&quot;Times New Roman&quot;;
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;September is gone already, that was crazy fast.&lt;span&gt;  &lt;/span&gt;Digital Engine Software has been busy but
nothing too much has changed since last month.&lt;span&gt; 
&lt;/span&gt;Kevin has been teetering on the edge of insanity as he works on trying
to automate some interactions with the state websites.&lt;span&gt;  &lt;/span&gt;I’m tempted to try and push him over because
I’ve never seen a ginger angry before but as it is I will most likely be the
first against the wall when the Kevin revolution comes so I’m not going to push
my luck.&lt;/p&gt;



&lt;p class=&quot;MsoNormal&quot;&gt;In other news we were asked to do an evaluation of some
inventory management software.&lt;span&gt;  &lt;/span&gt;Peter
took charge of that and it turns out, unfortunately, that there is only one
semi-decent piece of open source inventory management software (&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.openbravo.com&#039;]);&quot;  href=&quot;http://www.openbravo.com&quot;&gt;OpenBravo&lt;/a&gt; in
case anyone is curious).&lt;span&gt;  &lt;/span&gt;OpenBravo is
even a corporate sponsored half open source half premium product that has
received almost $20M in venture funding.&lt;span&gt; 
&lt;/span&gt;As we were evaluating off-the-shelf software options we also ran the
numbers on our own development.&lt;span&gt;  &lt;/span&gt;Once you
begin digging into the nitty gritty of the software features you begin to
realize how incredibly immense these programs are.&lt;span&gt;  &lt;/span&gt;Our conservative estimate for development
time was nearly 3,000 hours.&lt;span&gt;  &lt;/span&gt;There are
admittedly some very complex and gigantic open source projects but inventory
management doesn’t have nearly the sexy cachet of say a new encryption
algorithm implementation.&lt;span&gt;  &lt;/span&gt;Ultimately we
discovered that this is definitely an area that is better served by closed
source proprietary solutions.&lt;span&gt;  &lt;/span&gt;Peter is
also still hard at work on his GIT GUI project.&lt;span&gt; 
&lt;/span&gt;I’m pushing him to get it done by December 7&lt;sup&gt;th&lt;/sup&gt; because it’s
possible that he may become a permanent resident of the World of Warcraft once
&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.worldofwarcraft.com/cataclysm&#039;]);&quot;  href=&quot;http://www.worldofwarcraft.com/cataclysm&quot;&gt;Cataclysm&lt;/a&gt; comes out.&lt;/p&gt;



&lt;p class=&quot;MsoNormal&quot;&gt;As I blogged earlier I spent most of September preparing for
and actually doing the Orbit seminars.&lt;span&gt;  &lt;/span&gt;So
much fun!&lt;span&gt;  &lt;/span&gt;We have another &lt;a href=&quot;http://digitalenginesoftware.com/lan/&quot;&gt;LAN party&lt;/a&gt;
coming up this Saturday (October 9&lt;sup&gt;th&lt;/sup&gt;) at the library.&lt;span&gt;  &lt;/span&gt;Our reserved seat charity this time around is
the Human Resource Development Council – donate and help keep people warm and
fed this winter.&lt;span&gt;  &lt;/span&gt;I’ve also been
attending some &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.facebook.com/group.php?gid=116631795026001&#039;]);&quot;  href=&quot;http://www.facebook.com/group.php?gid=116631795026001&quot;&gt;Young Professionals Group&lt;/a&gt; meetings. These are really cool get-togethers
put on once a month by the Chamber of Commerce (you don’t have to be a member
of the Chamber to join YPG) where younger individuals (&amp;lt;35or so) meet to
network, learn stuff, volunteer and have fun.&lt;span&gt; 
&lt;/span&gt;Last month we had three business people from the community come in and
answer our questions and I’ve heard that this month is Vegas night.&lt;span&gt;  &lt;/span&gt;There are four sub-committees within YPG that
you can join: Community service, education, social and mentoring and the groups
alternate hosting the meeting or activity each month. If you’re a younger
professional and you enjoy groups you should totally join (bonus points if you’re
not a financial adviser or a chiropractor).&lt;/p&gt;


 
    </content:encoded>

    <pubDate>Mon, 04 Oct 2010 14:35:14 -0600</pubDate>
    <guid isPermaLink="false">http://www.digitalenginesoftware.com/blog/archives/53-guid.html</guid>
    <category>news</category>

</item>
<item>
    <title>Orbit Presentations</title>
    <link>http://www.digitalenginesoftware.com/blog/archives/52-Orbit-Presentations.html</link>
    
    <comments>http://www.digitalenginesoftware.com/blog/archives/52-Orbit-Presentations.html#comments</comments>
    <wfw:comment>http://www.digitalenginesoftware.com/blog/wfwcomment.php?cid=52</wfw:comment>

    <wfw:commentRss>http://www.digitalenginesoftware.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=52</wfw:commentRss>
    

    <author>nospam@example.com (Mike Archer)</author>
    <content:encoded>
    
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if !mso]&gt;&lt;object
 classid=&quot;clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D&quot; id=ieooui&gt;&lt;/object&gt;
&lt;style&gt;
st1\:*{behavior:url(#ieooui) }
&lt;/style&gt;
&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:&quot;Table Normal&quot;;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:&quot;&quot;;
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:&quot;Times New Roman&quot;;
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Last week Gary Bloomer from the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/techranch.org&#039;]);&quot;  href=&quot;http://techranch.org&quot;&gt;Tech Ranch&lt;/a&gt;, Shelby Nordhagen
of &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.netnewmarketing.com/&#039;]);&quot;  href=&quot;http://www.netnewmarketing.com/&quot;&gt;NetNewMarketin&lt;/a&gt;&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.netnewmarketing.com/&#039;]);&quot;  href=&quot;http://www.netnewmarketing.com/&quot;&gt;g&lt;/a&gt; and I made a trip up to Bigfork and Frenchtown to give our
presentations on e-marketing.&lt;span&gt;  &lt;/span&gt;It was so
much fun!&lt;span&gt;  &lt;/span&gt;The audience members were awesome!&lt;span&gt;  &lt;/span&gt;They were really engaged and often
contributed as much or more than Shelby
and I did.&lt;span&gt;  &lt;/span&gt;I should warn, however, that
these seminars are pretty basic.&lt;span&gt;  &lt;/span&gt;We have
a lot of great information but anyone involved in the industry will likely know
95% of the stuff we cover.&lt;span&gt;  &lt;/span&gt;However, if
anyone reading this blog is interested in an introductory course on how to set
up a WordPress site, search engine optimization, Google Analytics, AdWords,
social networking or e-mail marketing should plan to attend one of our future
seminars!&lt;span&gt;  &lt;/span&gt;They’re a lot of fun, you can
make fun of Gary
and he can’t do a thing about it plus lunch is included.&lt;span&gt;  &lt;/span&gt;Keep an eye on this blog or the official&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/orbit-mt.com&#039;]);&quot;  href=&quot;http://orbit-mt.com&quot;&gt;
Orbit Montana
site&lt;/a&gt; for dates and places starting again in the beginning of 2011. &lt;/p&gt;


 
    </content:encoded>

    <pubDate>Mon, 27 Sep 2010 14:48:33 -0600</pubDate>
    <guid isPermaLink="false">http://www.digitalenginesoftware.com/blog/archives/52-guid.html</guid>
    <category>news</category>

</item>
<item>
    <title>State of Company</title>
    <link>http://www.digitalenginesoftware.com/blog/archives/50-State-of-Company.html</link>
    
    <comments>http://www.digitalenginesoftware.com/blog/archives/50-State-of-Company.html#comments</comments>
    <wfw:comment>http://www.digitalenginesoftware.com/blog/wfwcomment.php?cid=50</wfw:comment>

    <wfw:commentRss>http://www.digitalenginesoftware.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=50</wfw:commentRss>
    

    <author>nospam@example.com (Mike Archer)</author>
    <content:encoded>
    
&lt;p&gt;August is officially over (according to Julius Caesar) so time again for another State of the Company.  The big news this month is that  we have expanded!  An incredible office opened up on the third floor and since things were getting a little cramped up in the tower we decided to get it.  Half of the new office is for Peter and half has been converted into an employee lounge of sorts.  It&#039;s pretty swanky.  Unfortunately I keep forgetting to bring my camera into the office so no pictures yet but as soon as I remember I&#039;ll update this post.&lt;/p&gt;&lt;p&gt;For any budding entrepreneurs out there considering whether to get an office or work out of a garage, definitely get the office.  Yep it&#039;s a little extra money a month (when we were first looking prices ranged from ~$275-$600 per month for single offices) but the ability to go somewhere outside of your house and focus on your work is priceless. &lt;/p&gt;&lt;p&gt;On the work front Kevin is still working diligently on his office management project.  In fact, due to a shortage of decent backup programs Kevin spent part of August porting &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/duplicity.nongnu.org/&#039;]);&quot;  href=&quot;http://duplicity.nongnu.org/&quot;&gt;Duplicity&lt;/a&gt; from Linux to Windows!  Woohoo Kevin!  While we are waiting on some items to be sorted out with the heat mapping project Peter has been working on a GUI for &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/git-scm.com/&#039;]);&quot;  href=&quot;http://git-scm.com/&quot;&gt;Git&lt;/a&gt; which sounds like it is coming along nicely although I haven&#039;t seen it yet so it could be a lie just like the cake.  Finally I have been finishing up the real estate search plug-in for Joomanager, making modifications to the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/huffingforstuffing.com&#039;]);&quot;  href=&quot;http://huffingforstuffing.com&quot;&gt;Huffing For Stuffing&lt;/a&gt; site and working on my &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.orbit-mt.com&#039;]);&quot;  href=&quot;http://www.orbit-mt.com&quot;&gt;Orbit&lt;/a&gt; presentation. We are going to have a ton of great information at our Orbit presentations (the first two will be in Big Fork on the 22nd and Frenchtown on the 23rd) so come by if you can make it.  Also the next &lt;a href=&quot;http://www.digitalenginesoftware.com/lan&quot;&gt;LAN party&lt;/a&gt; will be on Saturday October 9th at the Library.  See you next month!&lt;/p&gt; 
    </content:encoded>

    <pubDate>Fri, 03 Sep 2010 12:59:41 -0600</pubDate>
    <guid isPermaLink="false">http://www.digitalenginesoftware.com/blog/archives/50-guid.html</guid>
    <category>news</category>

</item>

</channel>
</rss>