<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Philomathy</title>
	<atom:link href="http://www.reitshamer.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reitshamer.com</link>
	<description>Adventures in indie software development</description>
	<lastBuildDate>Sun, 08 Jan 2012 18:13:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>NSBrowser with checkboxes</title>
		<link>http://www.reitshamer.com/2011/03/nsbrowser-with-checkboxes/</link>
		<comments>http://www.reitshamer.com/2011/03/nsbrowser-with-checkboxes/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 15:17:28 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.reitshamer.com/?p=80</guid>
		<description><![CDATA[I wanted an NSBrowser with checkboxes for Arq to replace its ugly file-selection mechanism. Some type of file tree with checkboxes UI (like Dropbox and Crashplan use) seemed like a good fit, and I prefer NSBrowser to a (potentially gigantic) NSOutlineView. But I was stumped as to how to get checkboxes in an NSBrowser. Searching <a href='http://www.reitshamer.com/2011/03/nsbrowser-with-checkboxes/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I wanted an NSBrowser with checkboxes for <a href="http://www.haystacksoftware.com/arq/">Arq</a> to replace its ugly file-selection mechanism. Some type of file tree with checkboxes UI (like Dropbox and Crashplan use) seemed like a good fit, and I prefer NSBrowser to a (potentially gigantic) NSOutlineView. But I was stumped as to how to get checkboxes in an <code>NSBrowser</code>.</p>
<p>Searching the net gave me some clues, like I should subclass the cell that the NSBrowser uses and call <code>[NSBrowser setCellClass:]</code>, but searching also led me down some fruitless paths. Contrary to what you may have read, don&#8217;t subclass <code>NSBrowserCell</code> &#8212; it&#8217;s unsubclassable.</p>
<p>Finally I stumbled on Apple&#8217;s ComplexBrowser sample code. It uses a subclass of <code>NSTextFieldCell</code>. And it gives some clues on how to capture the checkbox click.</p>
<h2>The Code</h2>
<p>When I began my search, I was hoping to find someone&#8217;s sample project that did just what I wanted, but no luck. So I&#8217;m publishing my sample project for the next person who goes looking for such a thing:</p>
<p><a href="https://github.com/sreitshamer/FSBrowser">https://github.com/sreitshamer/FSBrowser</a></p>
<p>Enjoy!</p>
<p>- Stefan</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reitshamer.com/2011/03/nsbrowser-with-checkboxes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mac app version utility</title>
		<link>http://www.reitshamer.com/2009/09/mac-app-version-utility/</link>
		<comments>http://www.reitshamer.com/2009/09/mac-app-version-utility/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 14:44:48 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.reitshamer.com/?p=26</guid>
		<description><![CDATA[As part of my process for releasing a new version of Arq, I needed a way for my script to get the version of an app bundle. So, I wrote a simple utility called appversion which prints the value for the CFBundleVersion key in an app&#8217;s Info.plist. For example: appversion /Applications/iPhoto.app yields: 8.1 Download the <a href='http://www.reitshamer.com/2009/09/mac-app-version-utility/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>As part of my process for releasing a new version of <a href="http://www.haystacksoftware.com/">Arq</a>, I needed a way for my script to get the version of an app bundle.</p>
<p>So, I wrote a simple utility called <strong>appversion</strong> which prints the value for the CFBundleVersion key in an app&#8217;s Info.plist.</p>
<p>For example:</p>
<pre>	appversion /Applications/iPhoto.app</pre>
<p>yields:</p>
<pre>	8.1</pre>
<p>Download the 32/64-bit Universal binary (in a zip file) here:</p>
<p><a href="http://www.reitshamer.com/binaries/appversion.zip">appversion.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reitshamer.com/2009/09/mac-app-version-utility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Breakpad on Mac OS X 10.6</title>
		<link>http://www.reitshamer.com/2009/09/using-breakpad-on-mac-os-x-10-6/</link>
		<comments>http://www.reitshamer.com/2009/09/using-breakpad-on-mac-os-x-10-6/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 16:21:18 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.reitshamer.com/?p=18</guid>
		<description><![CDATA[Unlike web apps, desktop apps crash without the app&#8217;s developer knowing about it, unless the user sends a crash report to the developer. Whenever an app crashes, OS X puts up a dialog for the user to submit a crash report to Apple. Unfortunately for non-Apple apps that crash report never gets to the developer! <a href='http://www.reitshamer.com/2009/09/using-breakpad-on-mac-os-x-10-6/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Unlike web apps, desktop apps crash without the app&#8217;s developer knowing about it, unless the user sends a crash report to the developer. Whenever an app crashes, OS X puts up a dialog for the user to submit a crash report to Apple. Unfortunately for non-Apple apps that crash report never gets to the developer!</p>
<p>So, <a href="www.haystacksoftware.com">Arq</a> needs its own &#8220;crash reporter&#8221;. After reading Daniel Jalkut&#8217;s nice <a href="http://www.red-sweater.com/blog/860/crash-reporter-roundup">roundup of crash reporters</a>, I chose <a href="http://code.google.com/p/google-breakpad/">Breakpad</a> because it seems the most similar to Apple&#8217;s built-in crash reporter.</p>
<p>Adding Breakpad to your Mac OS X app is easy since the Breakpad team created a Framework around it.</p>
<h2>Building Breakpad</h2>
<p>Just download the <a href="http://code.google.com/p/google-breakpad/source/checkout">source</a>, open the XCode project under src/client/mac and compile the target &#8220;All&#8221;.</p>
<p>If you&#8217;re on 10.6 though, you&#8217;ll need to set the compiler for all the targets and sub-projects to &#8220;GCC 4.0&#8243;, or else you&#8217;ll get an error &#8220;GCC 4.2 is not compatible with the Mac OS X 10.4 SDK&#8221;.</p>
<p>The default settings for the project (at least as of svn revision 394) create a &#8220;32-bit Universal&#8221; build. 64-bit isn&#8217;t supported yet. See the Breakpad <a href="http://code.google.com/p/google-breakpad/issues/list">issues list</a> for more details.</p>
<h2>Adding Breakpad to Your App</h2>
<p>Once you&#8217;ve built Breakpad, drag Breakpad.framework into the Linked Frameworks folder of your XCode project. Be sure to check the &#8220;copy items into the destination group&#8217;s folder&#8221; box in the sheet that appears. Also check the target you want to add Breakpad to.</p>
<p>Next, create a &#8220;Copy Files&#8221; build phase in your target with a destination of &#8220;Frameworks&#8221;, and drag Breakpad.framework into that.</p>
<p>Next, add a bunch of variables to your app&#8217;s Info.plist, including:</p>
<pre>	BreakpadProduct
	BreakpadProductDisplay
	BreakpadVersion
	BreakpadVendor
	BreakpadURL
	BreakpadRequestComments</pre>
<p>See the comments in Breakpad.h for how to set those variables. One tricky bit: BreakpadRequestComments should be a <code>&lt;string&gt;</code> with a value of <code>"TRUE"</code> in your Info.plist, not a <code>&lt;true&gt;</code>.</p>
<p>As an example, here&#8217;s how I set my plist variables for Arq:</p>
<pre>    &lt;key&gt;BreakpadProduct&lt;/key&gt;
    &lt;string&gt;Arq&lt;/string&gt;
    &lt;key&gt;BreakpadProductDisplay&lt;/key&gt;
    &lt;string&gt;Arq&lt;/string&gt;
    &lt;key&gt;BreakpadVersion&lt;/key&gt;
    &lt;string&gt;1.1&lt;/string&gt;
    &lt;key&gt;BreakpadVendor&lt;/key&gt;
    &lt;string&gt;Haystack Software&lt;/string&gt;
    &lt;key&gt;BreakpadURL&lt;/key&gt;
    &lt;string&gt;http://crashreport.&lt;yourserverhere&gt;.com/arq/new&lt;/string&gt;
    &lt;key&gt;BreakpadReportInterval&lt;/key&gt;
    &lt;string&gt;0&lt;/string&gt;
    &lt;key&gt;BreakpadLogFiles&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/var/log/system.log&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;BreakpadLogFileTailSize&lt;/key&gt;
    &lt;string&gt;40000&lt;/string&gt;</pre>
<p>Finally, create a Breakpad object in your app:</p>
<pre>    BreakpadRef bp = BreakpadCreate([[NSBundle mainBundle] infoDictionary]);
    if (bp == NULL) {
        NSLog(@"failed to create Breakpad");
    }</pre>
<p>That&#8217;s it! Now crash your app to try it out <img src='http://www.reitshamer.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>On the server side, you&#8217;ll need something to process the report. I&#8217;ll post my server-side code soon. Tweet me @reitshamer if you need it right now.</p>
<p>UPDATE: I put the server-side code at <a href="http://github.com/sreitshamer/breakpadserver">http://github.com/sreitshamer/breakpadserver</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reitshamer.com/2009/09/using-breakpad-on-mac-os-x-10-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

