<?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>Whomwah.com &#187; OSX</title>
	<atom:link href="http://whomwah.com/tag/osx/feed/" rel="self" type="application/rss+xml" />
	<link>http://whomwah.com</link>
	<description>The website of Duncan Robertson, currently working for the BBC in London, Uk</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:51:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>My Garmin eTrex Vista HCx and OSX</title>
		<link>http://whomwah.com/2010/06/10/garmin-etrex-vista-hcx-and-osx/</link>
		<comments>http://whomwah.com/2010/06/10/garmin-etrex-vista-hcx-and-osx/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 21:05:00 +0000</pubDate>
		<dc:creator>Duncan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[garmin]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://whomwah.com/?p=1871</guid>
		<description><![CDATA[A quick post of my learnings when researching the best setup for my Garmin eTrex Vista HCx as most of what I initially found was old, PC only, or just plain wrong. I chose this GPS device because it was reasonably cheap, expandable, and allowed me to upload maps to the device, and visa-versa. I [...]]]></description>
			<content:encoded><![CDATA[<p>A quick post of my learnings when researching the best setup for my <a href="https://buy.garmin.com/shop/shop.do?pID=8703">Garmin eTrex Vista HCx</a> as most of what I initially found was old, PC only, or just plain wrong.</p>
<p><a href="http://www.flickr.com/photos/duncanponting/4688613801/" title="Garmin eTrex Vista HCx by whomwah, on Flickr"><img src="http://farm5.static.flickr.com/4016/4688613801_5aaa34bbab.jpg" width="500" height="281" alt="Garmin eTrex Vista HCx" /></a></p>
<p>I chose this GPS device because it was reasonably cheap, expandable, and allowed me to upload maps to the device, and visa-versa. I also wanted to use the power of <a href="http://www.openstreetmap.org/">OpenStreetMap</a>, rather than pay Garmin lots of money, and my research showed me this was possible.</p>
<p>So, rather than talk about all the things that I couldn&#8217;t find or do, I&#8217;ll just run through the good stuff. Here&#8217;s a run down of all the useful software I found.</p>
<ul>
<li><a href="http://touren.mospace.de/kachel.html">OSM/Computerteddy Garmin IMG tile calculator</a>
<p>Create a bounding box on a map of the world, and it will return an OSM IMG to use on your device. There&#8217;s even a great bookmarklet to use on the <a href="http://www.openstreetmap.org/">OpenStreetMap site</a>. This is an awesome site.</p>
</li>
<li><a href="http://download.geofabrik.de/osm/">geofabrik.de</a>
<p>A great resource of maps of the world. I don&#8217;t speak German, but you can get the idea of what you&#8217;re able to download.</p>
</li>
<li><a href="http://fredericbonifas.free.fr/osm/garmin.html">http://fredericbonifas.free.fr/</a>
<p>Detailed map of France. I used this on a recent cycle tour, and it was invaluable.</p>
</li>
<li><a href="http://www.trailrunnerx.com/">TrailRunner</a>
<p>TrailRunner is a route planning Mac software for all kinds of long distance sports like running, biking, hiking, inline-skating, skiing and more. It&#8217;s free, but a donation of 25 Euros will stop prompts. It&#8217;s a fantastic bit of software.</p>
</li>
<li><a href="http://www.cluetrust.com/LoadMyTracks.html">LoadMyTracks</a>
<p>This free utility works hand-in-hand with TrailRunner. It will send and receive data to and from the eTrex. It can also be used to translate data between the popular GPX and KML (Google Earth) formats. </p>
</li>
</ul>
<p>Finally there is <a href="http://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin">the OpenStreetMap Garmin page</a> which has the useful information about getting all this data onto the device, and much more.</p>
]]></content:encoded>
			<wfw:commentRss>http://whomwah.com/2010/06/10/garmin-etrex-vista-hcx-and-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nextKeyView and moving between NSTextfield and NSButton</title>
		<link>http://whomwah.com/2010/05/26/nextkeyviewtips/</link>
		<comments>http://whomwah.com/2010/05/26/nextkeyviewtips/#comments</comments>
		<pubDate>Wed, 26 May 2010 15:57:32 +0000</pubDate>
		<dc:creator>Duncan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://whomwah.com/?p=1913</guid>
		<description><![CDATA[This caught me out today, so I thought I&#8217;d share to save someone else scratching their head. The problem I was having was thus. In interface builder I had a window with an NSTextField and an NSButton. I want to be able to tab between them. I did what I thought was correct: Set the [...]]]></description>
			<content:encoded><![CDATA[<p>This caught me out today, so I thought I&#8217;d share to save someone else scratching their head. The problem I was having was thus. In interface builder I had a window with an <strong>NSTextField</strong> and an <strong>NSButton</strong>. I want to be able to tab between them. I did what I thought was correct:</p>
<ol>
<li>Set the <strong>intialFirstResponser</strong> for the <strong>NSWindow</strong> to be my <strong>NSTextField</strong></li>
<li>Set the <strong>NSTextField</strong> <strong>nextKeyView</strong> to be the <strong>NSButton</strong></li>
<li>Set the <strong>NSButton</strong> <strong>nextKeyView</strong> to be my <strong>NSTextField</strong></li>
</ol>
<p>But this was not working in the app! It Turns out that in the <em>Apple > System Preferences > Keyboard</em> there is a setting that allows you to press Tab to move keyboard focus between:</p>
<ul>
<li>Text boxes and lists only</li>
<li>All controls</li>
</ul>
<p>I think the top one is set by default. Once changed to <em>All controls</em> everything worked as expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://whomwah.com/2010/05/26/nextkeyviewtips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with Quartz Composer in Snow Leopard and the BBC Radio Schedule</title>
		<link>http://whomwah.com/2009/10/07/fun-with-quartz-composer-in-snow-leopard-and-the-bbc-radio-schedule/</link>
		<comments>http://whomwah.com/2009/10/07/fun-with-quartz-composer-in-snow-leopard-and-the-bbc-radio-schedule/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 12:34:30 +0000</pubDate>
		<dc:creator>Duncan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[quartzcomposer]]></category>
		<category><![CDATA[Screen Saver]]></category>

		<guid isPermaLink="false">http://whomwah.com/?p=1584</guid>
		<description><![CDATA[I&#8217;ve just posted on the BBC Radio Labs blog about some tinkering with Quartz Composer I&#8217;ve done. Please read the full article there, but in short, I&#8217;ve created a Quartz Composition that you can install as a Screen Saver, that reads in the BBC National Radio Schedule and rolls through each station showing who&#8217;s on [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just posted on the <a href="http://www.bbc.co.uk/blogs/radiolabs">BBC Radio Labs blog</a> about some <a href="http://www.bbc.co.uk/blogs/radiolabs/2009/10/fun_with_quartz_composer_in_sn.shtml">tinkering with Quartz Composer I&#8217;ve done</a>. Please read the full article there, but in short, I&#8217;ve created a <a href="http://en.wikipedia.org/wiki/Quartz_Composer">Quartz Composition</a> that you can install as a Screen Saver, that reads in the <a href="http://www.bbc.co.uk/radio/">BBC National Radio</a> Schedule and rolls through each station showing who&#8217;s on and displays a pretty picture. Oh, and I think it all looks very pretty.</p>
<p><img src="http://farm3.static.flickr.com/2568/3983622551_7ebbf90f30.jpg" alt="BBC Radio Screen Saver" /></p>
<p><a href="http://www.bbc.co.uk/blogs/radiolabs/2009/10/fun_with_quartz_composer_in_sn.shtml">Head on over to the Radio Labs site to download</a> and install on your machine. Please note though, it&#8217;s for <a href="http://en.wikipedia.org/wiki/Snow_Leopard">OSX 10.6 Snow Leopard</a> only.</p>
]]></content:encoded>
			<wfw:commentRss>http://whomwah.com/2009/10/07/fun-with-quartz-composer-in-snow-leopard-and-the-bbc-radio-schedule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another iPhone Code Sign Error Fix solution</title>
		<link>http://whomwah.com/2009/05/10/another-iphone-code-sign-error-fix-solution/</link>
		<comments>http://whomwah.com/2009/05/10/another-iphone-code-sign-error-fix-solution/#comments</comments>
		<pubDate>Sun, 10 May 2009 15:10:55 +0000</pubDate>
		<dc:creator>Duncan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://whomwah.com/?p=1498</guid>
		<description><![CDATA[Dam, this took far to long to suss out !!! I even left the London Open Hack 2009 early because I was unable to install development apps I was working on onto my iPhone, and it was proving so frustrating I decided to go home to try and fix it there &#8230; Dam!!! So the [...]]]></description>
			<content:encoded><![CDATA[<p>Dam, this took far to long to suss out !!! I even left the <a href="http://www.hackday.org/">London Open Hack 2009</a> early because I was unable to install development apps I was working on onto my <a href="http://apple.com/iphone">iPhone</a>, and it was proving so frustrating I decided to go home to try and fix it there &#8230; Dam!!!</p>
<p>So the error I was getting was:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">Code Sign error: The identity 'iPhone Developer' doesn't match any valid 
certificate/private key pair in the default keychain</pre></div></div>

<p>I won&#8217;t bore you with all the variations, forums, websites read and ways I tried to solve this, and will leave you with the solution in this case. The problem was that the KeyChain App had changed it&#8217;s <em>default</em> keychain over to &#8216;<strong>system</strong>&#8216; and it should have been &#8216;<strong>login</strong>&#8216; as this is where all my keys and certificates are installed. Also, the <em>default</em> keychain is where <a href="http://developer.apple.com/TOOLS/xcode/">Xcode</a> looks.  The default keyChain in the one in the keychains list that is bold. To make one the default, you right click on it and select the &#8216;make default&#8217; item from the list.</p>
<p>Yep, That&#8217;s It!! and to be honest the error message make a little more sense now I&#8217;ve fixed it &#8230; Dam!</p>
]]></content:encoded>
			<wfw:commentRss>http://whomwah.com/2009/05/10/another-iphone-code-sign-error-fix-solution/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Using Cocoa to keep an app window always on top</title>
		<link>http://whomwah.com/2009/04/11/using-cocoa-to-keep-an-app-window-always-on-top/</link>
		<comments>http://whomwah.com/2009/04/11/using-cocoa-to-keep-an-app-window-always-on-top/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 16:39:21 +0000</pubDate>
		<dc:creator>Duncan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://whomwah.com/?p=1393</guid>
		<description><![CDATA[Sometimes you want your application to keep one of it&#8217;s windows always-on-top. A chat application like Adium for example, allows you to keep your conversation window always-on-top so you can follow the conversation whilst still using other applications. In the TellyBox application I wrote, this functionality is also very useful, as you can watch tv [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want your application to keep one of it&#8217;s windows always-on-top. A chat application like <a href="http://www.adiumx.com/">Adium</a> for example, allows you to keep your conversation window always-on-top so you can follow the conversation whilst still using other applications. In the <a href="http://whomwah.github.com/tellybox/">TellyBox</a> application I wrote, this functionality is also very useful, as you can watch tv whilst still working in other applications.</p>
<p>So the basic implementation was fairly simple. You just use the <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/doc/uid/20000013-BCIDIEDF">windowDidResignMain notification</a>, and then re-set the window level a more fitting one. Below I have also wrapped around a preference setting:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>windowDidResignMain<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSNotification</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>notification
<span style="color: #002200;">&#123;</span>
  <span style="color: #11740a; font-style: italic;">// It's always nicer if the user has a choice</span>
  <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSUserDefaults</span> standardUserDefaults<span style="color: #002200;">&#93;</span> boolForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;DefaultAlwaysOnTop&quot;</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">==</span> <span style="color: #a61390;">YES</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
    <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>self window<span style="color: #002200;">&#93;</span> setLevel<span style="color: #002200;">:</span>NSFloatingWindowLevel<span style="color: #002200;">&#93;</span>;
  <span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span>
    <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>self window<span style="color: #002200;">&#93;</span> setLevel<span style="color: #002200;">:</span>NSNormalWindowLevel<span style="color: #002200;">&#93;</span>;
  <span style="color: #002200;">&#125;</span>
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>My <a href="http://whomwah.github.com/tellybox/">TellyBox</a> application allows you to go fullscreen via the existing Flash application embedded in a webkit view. Using just the basic implementation meant that when going into fullscreen mode the frame of the original window remained in view. To fix this I added this extra bit of code, which gets used via the firing of another useful notification <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/doc/uid/20000013-BCIEBCEI">windowDidBecomeMain</a> :</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>windowDidBecomeMain<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSNotification</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>notification
<span style="color: #002200;">&#123;</span>
  <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>self window<span style="color: #002200;">&#93;</span> setLevel<span style="color: #002200;">:</span>NSNormalWindowLevel<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>which sets the window level back to it&#8217;s default value of 0 when it becomes the main window i.e when you select it.</p>
<p>I hope this little snippet helps people trying to achieve the same effect in their apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://whomwah.com/2009/04/11/using-cocoa-to-keep-an-app-window-always-on-top/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lookup &#8211; A simple Mac utility that wraps ldapsearch</title>
		<link>http://whomwah.com/2009/04/07/lookup/</link>
		<comments>http://whomwah.com/2009/04/07/lookup/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 11:53:14 +0000</pubDate>
		<dc:creator>Duncan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[lookup]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://whomwah.com/?p=1361</guid>
		<description><![CDATA[I work on a Mac at work, and it has always been a bit slow searching for other staff members in our global address book. Like other big organisations we have some directory services which we can use LDAP to interrogate. The seemingly standard way for apps to poll these services is asynchronously every second [...]]]></description>
			<content:encoded><![CDATA[<p>I work on a <a href="http://www.apple.com/mac/">Mac</a> at <a href="http://www.bbc.co.uk/">work</a>, and it has always been a bit slow searching for other staff members in our global address book. Like other big organisations we have some <a href="http://en.wikipedia.org/wiki/Directory_service">directory services</a> which we can use <a href="http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol">LDAP</a> to interrogate. The seemingly standard way for apps to poll these services is <a href="http://en.wikipedia.org/wiki/Asynchronous_I/O">asynchronously</a> every second or so, so that you&#8217;re getting results back quickly in the background. In reality this can be clunky if your network is slow, or the directory is very big.</p>
<p>I wanted something simpler, and a gui that gave me was suited to my work requirements. Lookup displays glance-able contact details straight away, letting you copy, paste and drag this data around. It also has simple shortcuts like double clicking the contact to start a new email to that person.</p>
<p>Lookup does not poll asynchronously, it does one request per search and just looks through some key attributes. It seems to work very well, and has been customised for my workplace, but is generic enough for someone to tweak it to suit their companies needs.</p>
<p><a href="http://www.flickr.com/photos/duncanponting/3420133723/"><img src="http://farm4.static.flickr.com/3302/3420133723_714683acc3.jpg?v=0" alt="Lookup" /></a></p>
<p>It wraps <a href="http://linux.die.net/man/1/ldapsearch">ldapsearch</a>, which is a command line app that comes free on your mac. When I say wraps, it&#8217;s not a complete wrapper, but wraps enough to create an app of this kind. Ldapsearch app did everything I wanted in search terms, and gave me a chance to use <a href="http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSTask_Class/index.html">NSTask</a> and <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSPipe_Class/index.html">NSPipe</a> which I know will be useful in the future.</p>
<p>You can get the <a href="http://github.com/whomwah/lookup/tree/master">source over at Github</a>. Why not try and tweak it to work for your company. You never know, just compiling it and updating the settings in the preferences menu may be enough.</p>
<p class="note">Just to be clear, this app does NOT give you access to the BBC address book, just incase you thought I&#8217;d gone mad.</p>
]]></content:encoded>
			<wfw:commentRss>http://whomwah.com/2009/04/07/lookup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TellyBox 1.4, Twitter, Scheduling .. plus the coolest icon</title>
		<link>http://whomwah.com/2009/03/22/tellybox-1_4/</link>
		<comments>http://whomwah.com/2009/03/22/tellybox-1_4/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 15:35:42 +0000</pubDate>
		<dc:creator>Duncan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[tellybox]]></category>

		<guid isPermaLink="false">http://whomwah.com/?p=1283</guid>
		<description><![CDATA[[note] if you are updating and have the current app in your dock, you may need to remove it, and then re-add it again to get the new icon to appear straight away I&#8217;ve just released a new version of TellyBox, version 1.4. This version pulls in all the new features from sister app RadioAunty, [...]]]></description>
			<content:encoded><![CDATA[<p class="update">[<strong>note</strong>] if you are updating and have the current app in your dock, you may need to remove it, and then re-add it again to get the  new icon to appear straight away</p>
<p>I&#8217;ve just released a new version of <a href="http://whomwah.github.com/tellybox/">TellyBox</a>, version 1.4. This version pulls in all the<a href="http://whomwah.com/2009/03/14/radioaunty-feature-update-twitter-scheduling-and-much-more/"> new features from sister app RadioAunty</a>, plus a few news ones specific to TellyBox.</p>
<p>If you didn&#8217;t know, <a href="http://whomwah.github.com/tellybox">TellyBox</a> is a Mac app that allows you to watch live and catchup <a href="http://www.bbc.co.uk/tv/">BBC Television</a> (Uk users only I&#8217;m afraid). It uses the <a href="http://bbc.co.uk/iplayer/">BBC iPlayer</a> to actually display the telly, but wraps it all up into a native Mac application. </p>
<p><a href="http://www.flickr.com/photos/duncanponting/sets/72157614336016460/"><img src="http://farm4.static.flickr.com/3596/3372908443_537eb57e45.jpg?v=0" alt="TellyApp screenshot" /></a></p>
<p>Like I mentioned above, new features include <a href="http://twitter.com/">Twitter</a> support and scheduling as per <a href="http://whomwah.github.com/radioaunty/">RadioAunty</a>. I recommend <a href="http://whomwah.com/2009/03/14/radioaunty-feature-update-twitter-scheduling-and-much-more/">reading this post</a> to get more information on these. As well as them, the new features specific to TellyBox are:</p>
<ol>
<li>I have removed the default channel entry from the preferences. The app now just remembers what channel you last watched.</li>
<li>The close button, and zoom buttons (red and green) now work.</li>
<li>A brand new app icon (designed by <a href="http://boxblu.com/">David Wilson</a>)</li>
</ol>
<p>I&#8217;m really pleased with the icon. I know <a href="http://boxblu.com/?p=42">David spent a lot of time designing it</a>, and for a first application icon, I think it&#8217;s awesome. I also knew the effect I wanted. I really liked the idea of the icon being a mini telly showing you exactly what you are watching in the main screen. It seems <a href="http://normalkid.com/2008/05/09/application-icons-and-domain-names/">Mac icons can make or break an app</a>, so I&#8217;m hoping this one can only help.</p>
<p>It&#8217;s actually quite a simple effect to achieve. It&#8217;s just about building layers. I use <a href="http://www.cocoadev.com/index.pl?ScreenShotCode">CGWindowListCreateImage</a> to take a screen grab of what&#8217;s playing over time. When I have a new grab, I then construct the dock icon, using the grab at the bottom, then a version of the app icon with a transparent screen to give the glass effect, and finally the channel logo. If you minimize the app, or change windows using spaces, then the icon will change to the <a href="http://images.google.com/images?client=safari&#038;rls=en-us&#038;q=bbc+test+card&#038;oe=UTF-8&#038;um=1&#038;ie=UTF-8&#038;ei=f1TGSfjDPMaHtgfNyZHUCg&#038;sa=X&#038;oi=image_result_group&#038;resnum=1&#038;ct=title">BBC test card</a>.</p>
<p><a href="http://whomwah.github.com/tellybox/">Download TellyBox from the project page on Github</a>, or if you already have the app installed, then you should get a request to update automagically.</p>
]]></content:encoded>
			<wfw:commentRss>http://whomwah.com/2009/03/22/tellybox-1_4/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>RadioAunty feature update &#8211; twitter, scheduling and much more</title>
		<link>http://whomwah.com/2009/03/14/radioaunty-feature-update-twitter-scheduling-and-much-more/</link>
		<comments>http://whomwah.com/2009/03/14/radioaunty-feature-update-twitter-scheduling-and-much-more/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 19:50:40 +0000</pubDate>
		<dc:creator>Duncan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://whomwah.com/?p=1239</guid>
		<description><![CDATA[In my on going Cocoa learning I have been working hard on updates for RadioAunty. ( If you didn&#8217;t know, RadioAunty is Mac app that allows you to listen to live and catchup BBC Radio ). This means the feature list is now quite compelling, so I decided to give and overview of the features [...]]]></description>
			<content:encoded><![CDATA[<p>In my on going <a href="http://developer.apple.com/cocoa/">Cocoa</a> learning I have been working hard on updates for <a href="http://whomwah.github.com/radioaunty/">RadioAunty</a>. ( If you didn&#8217;t know, RadioAunty is Mac app that allows you to listen to live and catchup BBC Radio ). This means the feature list is now quite compelling, so I decided to give and overview of the features to date.</p>
<p><strong>1. Select your Favourite Station</strong> &#8211; Choose from all the <a href="http://www.bbc.co.uk/radio/">BBC National radio stations</a>. You can listen to them in Normal RealPlayer or the much higher quality ACC streams. Make your decision via the preferences screen.</p>
<p><a href="http://www.flickr.com/photos/duncanponting/sets/72157615137746093/"><img src="http://farm4.static.flickr.com/3452/3351927033_7d2d56fcea.jpg?v=0" alt="RadioAunty select a Station" /></a></p>
<p><strong>2. Minimise the radio</strong> &#8211; I didn&#8217;t think people generally stare at the player whilst they are listening, so you can now minimise it like you can with <a href="http://www.apple.com/itunes">iTunes</a>, using ^ cmd Z or the window menu. You can also tweak the width whilst minimised. You will also see that the window title shows the current show playing. This updates along with the schedule as time goes on. More on this next.</p>
<p><a href="http://www.flickr.com/photos/duncanponting/sets/72157615137746093/"><img src="http://farm4.static.flickr.com/3454/3351927271_bd0ec71ca9.jpg?v=0" alt="RadioAunty minimized" /></a></p>
<p><strong>3. View the schedule</strong> &#8211; In the Schedule menu, you will see the day schedule for the station you are listening to (using data from <a href="http://bbc.co.uk/programmes">BBC programmes</a>). You will see a tick next to the show you are currently listening. You will also see that some shows are clickable. This is stuff you can listen to, that is available to catchup in <a href="http://www.bbc.co.uk/iplayer/">iPlayer</a>, it also displays how long left that show is available in iPlayer for. This schedule updates as you listen throughout the day. </p>
<p><img src="http://farm4.static.flickr.com/3434/3354268798_02081fdbf1.jpg?v=0" alt="RadioAunty schedule menu" /></p>
<p><strong>4. Twitter support and other preferences</strong> &#8211; The preferences window gives you the chance to change some of RadioAunty&#8217;s settings and turn on others. From the top, we have updates. Turning this on allows you to receive updates to the application when they become available. Next is default station. This allows you to choose a default station to open with (I think this may be removed next release, and the app will just remember what you last listened to. Next is audio quality. It&#8217;s best to stick to high quality, but those streams are only available in the UK, so if you are listening abroad you will have to choose normal quality. Finally <a href="http://twitter.com">Twitter</a> support. Opting in means that as you listen, details about what you are listening to will be sent to the <a href="http://twitter.com/radioandtvbot">@radioandtvbot</a> account on Twitter. If you supply your twitter username, this will be added to the tweet instead of the default, which is your computer login FullName. The screenshot below next shows you what gets sent.</p>
<p><a href="http://www.flickr.com/photos/duncanponting/sets/72157615137746093/"><img src="http://farm4.static.flickr.com/3651/3352752518_23810447a0.jpg?v=0" alt="RadioAunty twitter support" /></a><br />
<img src="http://farm4.static.flickr.com/3209/3353735857_4367bff3b6.jpg" alt="radioandtvbot" /></p>
<p><strong>5. A nice dynamic app icon</strong> &#8211; The wonderful Tim Broom made the current icon. The icon changes, showing the network you are currently listening to.</p>
<p><a href="http://www.flickr.com/photos/duncanponting/sets/72157615137746093/"><img src="http://farm4.static.flickr.com/3601/3351926135_fba2d2cf0d.jpg?v=0" alt="Nice Icon" /></a></p>
<p><strong>6. Growl support</strong> &#8211; If you use Growl, then RadioAunty will notify you when a show starts playing. If you choose the twitter support it will also notify you when this information is sent to twitter.</p>
<p><a href="http://www.flickr.com/photos/duncanponting/sets/72157615137746093/"><img src="http://farm4.static.flickr.com/3638/3351926335_acd4880bd6.jpg?v=0" alt="Growl Support" /></a></p>
<p>Next then. I&#8217;m going to be transferring the twitter and scheduling stuff over to <a href="http://whomwah.github.com/tellybox/">TellyBox</a> (A Mac app that allows you to watch live and catchup BBC Television). So watch out for the updates. Then I think <a href="http://www.last.fm/">lastfm</a> integration is on the cards. It&#8217;s be nice to scrobble what tracks you are listening to.</p>
]]></content:encoded>
			<wfw:commentRss>http://whomwah.com/2009/03/14/radioaunty-feature-update-twitter-scheduling-and-much-more/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Replicating Apples embossed text in a Cocoa App</title>
		<link>http://whomwah.com/2009/03/11/replicating-apples-embossed-text-in-a-cocoa-app/</link>
		<comments>http://whomwah.com/2009/03/11/replicating-apples-embossed-text-in-a-cocoa-app/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 11:22:04 +0000</pubDate>
		<dc:creator>Duncan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://whomwah.com/?p=1203</guid>
		<description><![CDATA[[update] Thanks to the chaps below in the comments, my in-experience with cocoa is shown. This whole post could be replaced with this code: &#91;&#91;myTextField cell&#93; setBackgroundStyle:NSBackgroundStyleRaised&#93;; If you look at the text in the task or status bar on of a Mac app, you will see that the text has the appearance of being [...]]]></description>
			<content:encoded><![CDATA[<p class="update"><strong>[update]</strong> Thanks to the chaps below in the comments, my in-experience with cocoa is shown. This whole post could be replaced with this code:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>myTextField cell<span style="color: #002200;">&#93;</span> setBackgroundStyle<span style="color: #002200;">:</span>NSBackgroundStyleRaised<span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>If you look at the text in the task or status bar on of a Mac app, you will see that the text has the appearance of being embossed slightly. It is essentially a textField with some neat attributes associated with it.</p>
<p><a href="http://www.flickr.com/photos/duncanponting/3346662608/"><img src="http://farm4.static.flickr.com/3657/3346662608_9da98cf85b.jpg" alt="Apple embossed text" /></a></p>
<p>This effect does not come for free when you want to use your own <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextField_Class/Reference/Reference.html">NSTextField</a> somewhere else in your Apps window (actually, I think it does on the iPhone?). To recreate this effect is quite simple. You just need to create a <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSAttributedString_Class/Reference/Reference.html">NSAttibutedString</a> and associate the attributes below to it.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">// Create the white shadow that sits behind the text</span>
<span style="color: #400080;">NSShadow</span> <span style="color: #002200;">*</span>shadow <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSShadow</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>shadow setShadowColor<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSColor</span> colorWithDeviceWhite<span style="color: #002200;">:</span>1.0 alpha<span style="color: #002200;">:</span>0.5<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>shadow setShadowOffset<span style="color: #002200;">:</span>NSMakeSize<span style="color: #002200;">&#40;</span>1.0, <span style="color: #002200;">-</span>1.1<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #11740a; font-style: italic;">// Create the attributes dictionary, you can change the font size</span>
<span style="color: #11740a; font-style: italic;">// to whatever is useful to you</span>
<span style="color: #400080;">NSMutableDictionary</span> <span style="color: #002200;">*</span>sAttribs <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSMutableDictionary</span> alloc<span style="color: #002200;">&#93;</span> initWithObjectsAndKeys<span style="color: #002200;">:</span>
    <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSFont</span> systemFontOfSize<span style="color: #002200;">:</span>11.0<span style="color: #002200;">&#93;</span>,NSFontAttributeName,
    shadow, NSShadowAttributeName,
    <span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;
<span style="color: #11740a; font-style: italic;">// The shadow object has been assigned to the dictionary, so release</span>
<span style="color: #002200;">&#91;</span>shadow release<span style="color: #002200;">&#93;</span>;
<span style="color: #11740a; font-style: italic;">// Create a new attributed string with your attributes dictionary attached</span>
<span style="color: #400080;">NSAttributedString</span> <span style="color: #002200;">*</span>s <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSAttributedString</span> alloc<span style="color: #002200;">&#93;</span> initWithString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;82 results found&quot;</span>
    attributes<span style="color: #002200;">:</span>sAttribs<span style="color: #002200;">&#93;</span>;
<span style="color: #11740a; font-style: italic;">// Set your text value</span>
<span style="color: #002200;">&#91;</span>myTextField setAttributedStringValue<span style="color: #002200;">:</span>s<span style="color: #002200;">&#93;</span>;
<span style="color: #11740a; font-style: italic;">// Clean up</span>
<span style="color: #002200;">&#91;</span>s release<span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>I&#8217;m sure there are many other ways to achieve this effect, and I&#8217;d be interested in any easier versions, but this works for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://whomwah.com/2009/03/11/replicating-apples-embossed-text-in-a-cocoa-app/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Experiments in Cocoa #1 RadioAunty</title>
		<link>http://whomwah.com/2008/12/12/radioaunty/</link>
		<comments>http://whomwah.com/2008/12/12/radioaunty/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 21:47:05 +0000</pubDate>
		<dc:creator>Duncan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[radioaunty]]></category>

		<guid isPermaLink="false">http://whomwah.com/?p=826</guid>
		<description><![CDATA[[UPDATE] I&#8217;ve updated the app to now use the new higher quality live streams. Yay, no more RealPlayer for the majority. I&#8217;ve seem to have spent a lot of time reading about Cocoa without actually building anything of substance. So to put a change to that I have built RadioAunty. 1. RadioAunty &#8211; This is [...]]]></description>
			<content:encoded><![CDATA[<p class="update">[UPDATE] I&#8217;ve updated the app to now use the <a href="http://www.bbc.co.uk/blogs/bbcinternet/2009/02/better_audio_for_bbc_radio_onl.html">new higher quality live streams</a>. Yay, no more RealPlayer for the majority.</p>
<p>I&#8217;ve seem to have spent a lot of time reading about <a href="http://developer.apple.com/cocoa/">Cocoa</a> without actually building anything of substance. So to put a change to that I have built <a href="http://whomwah.github.com/radioaunty/">RadioAunty</a>.</p>
<p>1. <a href="http://whomwah.github.com/radioaunty/">RadioAunty</a> &#8211; This is a Cocoa Application that lets you listen to the radio, <a href="http://www.bbc.co.uk/radio/">BBC radio</a>, on your desktop. You can view the current schedule and select listen again shows, as well as simply changing the station via the menu bar and via the Dock. You can also set preferences to decide which should be your default Station to start with, and whether you would like to receive updates to the application when they are available (very important). If you have <a href="http://www.bbc.co.uk/iplayer/radio/">listened to BBC radio</a> via <a href="http://www.apple.com/safari/">Safari</a>, then RadioAunty should work just fine for you.</p>
<p><a href="http://whomwah.github.com/radioaunty/">Download RadioAunty from it&#8217;s project site</a></p>
<p><img src="http://farm4.static.flickr.com/3286/3103478230_d9e063d34a.jpg?v=1231598066" alt="RadioAunty" /></p>
<p>There are now many <a href="http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CocoaFundamentals/WhatIsCocoa/chapter_2_section_5.html">*.frameworks</a> that come as part of the <a href="http://developer.apple.com/Tools/">Apple Developer Tools</a> and  I found it pretty daunting to start with. So to make life easier for myself, I decided to start small and build bigger as I go along. This is why I started with the simple idea of RadioAunty. Oh and it&#8217;s <a href="http://www.apple.com/macosx/">Leopard</a> only because it seemed silly to have to learn old ways of doing things as well as new.</p>
<p>RadioAunty is at a high level not that complex. It basically embeds an already existing webpage into a desktop app. It seemed like an ideal starting point. Once I had got that working (Thanks <a href="http://www.apple.com/">Apple</a>, it takes about 3 lines of code!), the next thing was to make use of other classes and functionality to actually learn something. The app as it stands uses only uses these Cocoa classes (I&#8217;ve left the boring ones out):</p>
<ul>
<li><a href="http://developer.apple.com/documentation/Cocoa/Reference/WebKit/Classes/WebView_Class/index.html">WebView</a></li>
<li><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSMenu_Class/Reference/Reference.html">NSMenu</a></li>
<li><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSProgressIndicator_Class/Reference/Reference.html">NSProgressIndicator</a></li>
<li><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindowController_Class/Reference/Reference.html">NSWindowController</a></li>
<li><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSPropertyListSerialization_Class/Reference/Reference.html">NSPropertyListSerialization</a></li>
<li><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html">NSUserDefaults</a></li>
<li><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/Reference/Reference.html">NSBundle</a></li>
<li>SUUpdater (Part of <a href="http://sparkle.andymatuschak.org/">the wonderful Sparkle Framework</a>)</li>
</ul>
<p>I&#8217;ve used @property quite a lot (properties are a bit like <a href="http://ruby-lang.org/">Ruby</a> <a href="http://www.ruby-doc.org/docs/UsersGuide/rg/accessors.html">:attr_accessor</a>) to automagically create getter and setters. I have also use key-value bindings, which once I understood them were amazing, and allow you to chop huge chunks of code from your source. I use a stations.plist to store the radio station data, but hope to pull that from the web in the future, meaning that it could play any radio station and not just the BBC&#8217;s. I also use delegation a lot whenever I can.</p>
<p>As I only started the app on Tuesday, I&#8217;ll continue making it more polished, that and I have a few other ideas, but I wanted to get something out for people to use as quickly as possible, so first main thing to add (apart from the radio) was auto-updating. This is taken care of by <a href="http://sparkle.andymatuschak.org/files/Sparkle%201.5b6.zip">Sparkle 1.5b6</a>.</p>
<p><a href="http://sparkle.andymatuschak.org/">Sparkle</a> was super simple to implement. Their <a href="http://sparkle.andymatuschak.org/documentation">wiki documentation</a> worked great, and I was amazed that something I always think is cool, and take for granted was so smooth to implement in this application. If you&#8217;re building OSX applications then this should surely be a must.</p>
<p>I have a few other projects in the pipeline, that incorporate more frameworks for me to learn, so stay posted. I&#8217;m progressing well with is an app called LeaveFrom, that does what is says on the tin really. It uses <a href="http://developer.apple.com/macosx/coredata.html">Core-Data</a> which again had a bit of a learning curve, but I&#8217;m getting on ok. Can my old brain take all this new fun information.</p>
]]></content:encoded>
			<wfw:commentRss>http://whomwah.com/2008/12/12/radioaunty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
