<?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>Inquisitive Cocoa</title>
	<atom:link href="http://inquisitivecocoa.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://inquisitivecocoa.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Tue, 10 Apr 2012 23:15:24 +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>+ imageWithPDFNamed: …</title>
		<link>http://inquisitivecocoa.com/2012/04/10/296/</link>
		<comments>http://inquisitivecocoa.com/2012/04/10/296/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 23:00:43 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Source]]></category>

		<guid isPermaLink="false">http://inquisitivecocoa.com/?p=296</guid>
		<description><![CDATA[@interface UIImage &#40;AJKImageWithPDF&#41; &#160; + &#40;UIImage *&#41;imageWithPDFNamed:&#40;NSString *&#41;pdfName; + &#40;UIImage *&#41;imageWithPDFNamed:&#40;NSString *&#41;pdfName scale:&#40;CGFloat&#41;scale; &#160; @end A small category for iOS to create an image from a .pdf file with as little fuss as possible: UIImage+WithPDF.]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="objc"><span class="kw1">@interface</span> UIImage <span class="br0">&#40;</span>AJKImageWithPDF<span class="br0">&#41;</span>
&nbsp;
<span class="sy0">+</span> <span class="br0">&#40;</span>UIImage <span class="sy0">*</span><span class="br0">&#41;</span>imageWithPDFNamed<span class="sy0">:</span><span class="br0">&#40;</span><span class="kw5">NSString</span> <span class="sy0">*</span><span class="br0">&#41;</span>pdfName;
<span class="sy0">+</span> <span class="br0">&#40;</span>UIImage <span class="sy0">*</span><span class="br0">&#41;</span>imageWithPDFNamed<span class="sy0">:</span><span class="br0">&#40;</span><span class="kw5">NSString</span> <span class="sy0">*</span><span class="br0">&#41;</span>pdfName scale<span class="sy0">:</span><span class="br0">&#40;</span>CGFloat<span class="br0">&#41;</span>scale;
&nbsp;
<span class="kw1">@end</span></pre></div></div>

<p>A small category for iOS to create an image from a .pdf file with as little fuss as possible:  <a href="https://gist.github.com/2355336">UIImage+WithPDF</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inquisitivecocoa.com/2012/04/10/296/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>killack</title>
		<link>http://inquisitivecocoa.com/2012/02/02/killack/</link>
		<comments>http://inquisitivecocoa.com/2012/02/02/killack/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 12:48:28 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://inquisitivecocoa.com/?p=291</guid>
		<description><![CDATA[#!/bin/sh ps ax &#124; ack $1[^/]*$ &#124; ack -v $0 &#124; awk '{print $1}' &#124; xargs kill]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="sh">#!/bin/sh
ps ax | ack $1[^/]*$ | ack -v $0 | awk '{print $1}' | xargs kill</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://inquisitivecocoa.com/2012/02/02/killack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Ruby shell script to open the nearest Xcode project from the terminal</title>
		<link>http://inquisitivecocoa.com/2012/01/21/a-rubyshell-script-to-open-the-nearest-xcode-project-from-the-terminal/</link>
		<comments>http://inquisitivecocoa.com/2012/01/21/a-rubyshell-script-to-open-the-nearest-xcode-project-from-the-terminal/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 13:57:00 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Source]]></category>

		<guid isPermaLink="false">http://inquisitivecocoa.com/?p=265</guid>
		<description><![CDATA[Here&#8217;s this mornings little productivity optimisation.. For ages I&#8217;ve had xc bound to open *.xcodeproj but that only works within the root directory of a project.. so heres a simple ruby script to open the Xcode project, either within the current working directory or within any of it&#8217;s parent directories. require 'pathname' &#160; success = [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s this mornings little productivity optimisation..  For ages I&#8217;ve had <code>xc</code> bound to <code>open *.xcodeproj</code> but that only works within the root directory of a project.. so heres a simple ruby script to open the Xcode project, either within the current working directory or within any of it&#8217;s parent directories.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span class="kw3">require</span> <span class="st0">'pathname'</span>
&nbsp;
success = <span class="kw2">FALSE</span>
&nbsp;
<span class="kw4">Pathname</span>.<span class="me1">getwd</span>.<span class="me1">ascend</span> <span class="kw1">do</span> <span class="sy0">|</span> directory <span class="sy0">|</span>
  directory.<span class="me1">each_entry</span> <span class="kw1">do</span> <span class="sy0">|</span> path <span class="sy0">|</span>
    <span class="kw1">if</span> path.<span class="me1">basename</span>.<span class="me1">fnmatch</span><span class="br0">&#40;</span><span class="st0">&quot;*.xcodeproj&quot;</span><span class="br0">&#41;</span>
      <span class="kw3">system</span> <span class="st0">&quot;open '#{directory + path}'&quot;</span>
      success = <span class="kw2">TRUE</span>;
    <span class="kw1">end</span>
  <span class="kw1">end</span>
<span class="kw1">end</span>
&nbsp;
&nbsp;
<span class="kw3">print</span> <span class="st0">&quot;  Couldn't find an *.xcodeproj file for the '#{Pathname.getwd}' directory<span class="es0">\n</span><span class="es0">\n</span>&quot;</span> <span class="kw1">if</span> !success</pre></div></div>

<p>Combined with an alias, either in your ~/.zshrc or ~/.bashrc files:</p>

<div class="wp_syntax"><div class="code"><pre class="zsh">alias xc=&quot;ruby ~/Developer/Offshoots/Scripts/Open\ Xcode\ Project.rb&quot;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://inquisitivecocoa.com/2012/01/21/a-rubyshell-script-to-open-the-nearest-xcode-project-from-the-terminal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Bezier</title>
		<link>http://inquisitivecocoa.com/2010/09/22/introducing-bezier/</link>
		<comments>http://inquisitivecocoa.com/2010/09/22/introducing-bezier/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 23:31:32 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Source]]></category>

		<guid isPermaLink="false">http://inquisitivecocoa.com/?p=238</guid>
		<description><![CDATA[FScript is the creation of Philippe Mougin, it&#8217;s a scripting language that is loosely based on Smalltalk but is built to use native Objective-C/Cocoa objects. It&#8217;s currently the closest thing available to a scripted version of Objective-C, with lots of nice Smalltalk-esque bonuses thrown in, like blocks (more like to Ruby&#8217;s blocks than Objective-C&#8217;s) and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fscript.org/">FScript</a> is the creation of <a href="http://pmougin.wordpress.com/">Philippe Mougin</a>, it&#8217;s a scripting language that is loosely based on Smalltalk but is built to use native Objective-C/Cocoa objects. It&#8217;s currently the closest thing available to a scripted version of Objective-C, with lots of nice Smalltalk-esque bonuses thrown in, like blocks (more like to Ruby&#8217;s blocks than Objective-C&#8217;s) and amazingly flexible array programming. It&#8217;s extremely cool.</p>
<hr />
<p>Bezier acts as a viewer for FScript.  It&#8217;s exactly what you get if you were to take the contents of a text file, parse it as FScript  and then execute it from within a views -drawRect: method.</p>
<p><img src="http://inquisitivecocoa.com/wp-content/uploads/Bezier-screenshot1.png" alt="Bezier Screenshot" title="Bezier-screenshot.png" border="0" width="600" height="501" /></p>
<p>The way I tend to set things up is to first create a file with the .bezier extension using my favourite text editor (I like TextMate, particularly when used in conjunction with <a href="http://github.com/textmate/f-script.tmbundle">the FScript bundle</a> that offers syntax highlighting, some simple snippets and basic auto-completion) and open that file in Bezier. I&#8217;ll then arrange the two windows so that they are both visible, either by placing them side by side, or on different screens, if that&#8217;s an option. Bezier will redraw it&#8217;s main view whenever it detects a changes to the file (using the AJKFileSystemObserver class) so all you need to do is write some FScript based drawing code, hit &#8216;Save&#8217; and the changes should be reflected in the other window.</p>
<p>I find it a refreshing change to the normal Build and Run approach using Xcode, particularly when it gets down to those tiny iterations that go into honing a pixel perfect UI. If your code contains any errors then the bottom view will try to offer some useful information to help with debugging:</p>
<p><img src="http://inquisitivecocoa.com/wp-content/uploads/Bezier-Error2.jpeg" alt="Bezier Error" title="Bezier-Error.jpeg" border="0" width="468" height="134" /></p>
<p>Once you&#8217;ve refined your drawing code it&#8217;s pretty easy to convert FScript code into standard Objective-C that you can use directly in your Cocoa applications thanks to their similar basic syntax although it&#8217;s worth bearing in mind that not all of FScripts niceties will translate to Objective-C.</p>
<p>I hope that you&#8217;ll find Bezier to be a useful tool for prototyping UI elements in code, particularly now that resolution independence is becoming a reality thanks to the new iPhones and iPods.</p>
<p>It currently offers a bare minimum of features. There are a few things that I plan to add when I have a spare moment (staring with a better example file), but I&#8217;m open to any suggestions, or forks if you feel like digging into the code yourself. It&#8217;d also be nice to hear from people who end up using Bezier, maybe even see some pictures if you create something super pretty!</p>
<p>You can download Bezier <a href="http://github.com/downloads/inquisitiveSoft/Bezier/Bezier.zip">as a binary</a> along with a sample .bezier file, or get the <a href="http://github.com/inquisitiveSoft/Bezier">source code on GitHub</a> (MIT license).</p>
<p><img style="background:none; border:0; display:block; margin-left:auto; margin-right:auto;" src="http://inquisitivecocoa.com/wp-content/uploads/Bezier-icon.png" alt="Bezier-icon.png" title="Bezier-icon.png" border="0" width="240" height="242" /></p>
]]></content:encoded>
			<wfw:commentRss>http://inquisitivecocoa.com/2010/09/22/introducing-bezier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Going Freelance</title>
		<link>http://inquisitivecocoa.com/2010/09/14/going-freelance/</link>
		<comments>http://inquisitivecocoa.com/2010/09/14/going-freelance/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 23:23:29 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://inquisitivecocoa.com/?p=233</guid>
		<description><![CDATA[Peering over the edge, the pool looks a lot further down than it did earlier. The water reflects the purple blue sky the single solitary cloud. Calm and unreadable, but somehow with a terrifying edge. A moment of stillness, followed by the dive. It will either be the most amazing, shimmering, life-changing experience.. or equally [...]]]></description>
			<content:encoded><![CDATA[<p>Peering over the edge, the pool looks a lot further down than it did earlier. The water reflects the purple blue sky the single solitary cloud. Calm and unreadable, but somehow with a terrifying edge.</p>
<p>A moment of stillness, followed by the dive.</p>
<p>It will either be the most amazing, shimmering, life-changing experience.. or equally it could be a total bellyflop. The black unbroken mirror of the water looms. Impossible to fathom. Time seems to hold it’s breath, and I can’t help enjoy the feeling of falling and the thrill of the unknown.</p>
<hr />
<p>From today I’m going freelance as a Cocoa and iOS developer, creating extra-ordinary, soulful applications for the iPhone, iPod Touch, iPad and the Mac. I’m a lone code wrangler, newly returned from shaving yaks in the distant lands of architecture, prepared to face down any problem the compiler throws at me. I&#8217;m ready, able and available for hire.</p>
]]></content:encoded>
			<wfw:commentRss>http://inquisitivecocoa.com/2010/09/14/going-freelance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NSString-EscapeHTMLCharacters</title>
		<link>http://inquisitivecocoa.com/2010/01/14/nsstring-escapehtmlcharacters/</link>
		<comments>http://inquisitivecocoa.com/2010/01/14/nsstring-escapehtmlcharacters/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 20:26:49 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Source]]></category>

		<guid isPermaLink="false">http://inquisitivecocoa.com/?p=223</guid>
		<description><![CDATA[Another category on NSString. This one converts a string containing characters that are special to HTML into their HTML entities. &#038; becomes &#38;amp; < becomes &#38;lt; > becomes &#38;gt; And so on.. It&#8217;s loosely based on a similar category in the Google Toolbox. It&#8217;s written with a bias towards simplicity rather than efficiency.. and it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Another category on NSString. This one converts a string containing characters that are special to HTML into their HTML entities.</p>
<p><code>&#038; becomes &amp;amp;<br />
< becomes &amp;lt;<br />
> becomes &amp;gt;<br />
And so on..</code></p>
<p>It&#8217;s loosely based on a similar category in the <a href="http://google-toolbox-for-mac.googlecode.com/svn/trunk/Foundation/GTMNSString+HTML.m">Google Toolbox</a>. It&#8217;s written with a bias towards simplicity rather than efficiency.. and it&#8217;s on GitHub: <a href="http://github.com/inquisitiveSoft/NSString-EscapeHTMLCharacters">http://github.com/inquisitiveSoft/NSString-EscapeHTMLCharacters</a>. MIT License.</p>
]]></content:encoded>
			<wfw:commentRss>http://inquisitivecocoa.com/2010/01/14/nsstring-escapehtmlcharacters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NSCache is slow</title>
		<link>http://inquisitivecocoa.com/2009/12/27/nscache-is-slow/</link>
		<comments>http://inquisitivecocoa.com/2009/12/27/nscache-is-slow/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 21:13:10 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://inquisitivecocoa.com/?p=217</guid>
		<description><![CDATA[Really slow according to Shark: Apparently inserting an object into NSCache is 50x slower than a regular NSMutableDictionary! It&#8217;s possible Shark might not be reporting the figures accurately. My current work-around is to store up additions to the NSCache so that they can be inserted at a later time, when processing power is at less [...]]]></description>
			<content:encoded><![CDATA[<p>Really slow according to Shark:</p>
<p><img src="http://inquisitivecocoa.com/wp-content/uploads/NSCache1.png" alt="NSCache.png" title="NSCache.png" border="0" width="477" height="35" /></p>
<p>Apparently inserting an object into NSCache is <strong>50x slower</strong> than a regular NSMutableDictionary! It&#8217;s possible Shark might not be reporting the figures accurately.</p>
<p>My current work-around is to store up additions to the NSCache so that they can be inserted at a later time, when processing power is at less of a premium. <small>Yes, shoot me. I&#8217;ve subclassed NSCache.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://inquisitivecocoa.com/2009/12/27/nscache-is-slow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode menu script to &quot;Open in TextMate&quot;</title>
		<link>http://inquisitivecocoa.com/2009/12/27/xcode-menu-script-to-open-in-textmate/</link>
		<comments>http://inquisitivecocoa.com/2009/12/27/xcode-menu-script-to-open-in-textmate/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 16:09:18 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://inquisitivecocoa.com/?p=208</guid>
		<description><![CDATA[I&#8217;ve no idea why it&#8217;s taken me so long to sort this one out. Especially when it&#8217;s so simple. #! /bin/sh # # Opens the current file in TextMate &#160; mate &#34;%%%{PBXFilePath}%%%&#34; Paste into a new user script (Scripts -> Edit User Scripts&#8230;) and set the Input, Directory and Output options to 'No Input', 'Selection', [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve no idea why it&#8217;s taken me so long to sort this one out. Especially when it&#8217;s so simple.</p>

<div class="wp_syntax"><div class="code"><pre class="sh">#! /bin/sh
#
# Opens the current file in TextMate
&nbsp;
mate &quot;%%%{PBXFilePath}%%%&quot;</pre></div></div>

<p>Paste into a new user script (Scripts -> Edit User Scripts&#8230;) and set the Input, Directory and Output options to <code>'No Input'</code>, <code>'Selection'</code>, and <code>'Discard Output'</code> respectively and choose a useful key combination.</p>
<p class="aligncenter">&#8226;</p>
<p>It&#8217;s strange how long we will struggle to work around a sub-optimal workflow, even when a fix might be disproportionately easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://inquisitivecocoa.com/2009/12/27/xcode-menu-script-to-open-in-textmate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8216;Build current project in Xcode&#8217;, TextMate command</title>
		<link>http://inquisitivecocoa.com/2009/09/12/build-current-project-in-xcode-textmate-command/</link>
		<comments>http://inquisitivecocoa.com/2009/09/12/build-current-project-in-xcode-textmate-command/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 23:49:25 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://inquisitivecocoa.com/?p=158</guid>
		<description><![CDATA[In a similar vein, here&#8217;s a command I use for building the project of the current document in Xcode. PROJECT=$&#40;ruby -- &#34;${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb&#34;&#41; if &#91;&#91; -f &#34;${PROJECT}/project.pbxproj&#34; &#93;&#93;; then open -a Xcode &#34;${PROJECT}&#34; else echo &#34;Didn't find an Xcode project file.&#34; echo &#34;You may want to set TM_XCODE_PROJECT.&#34; fi &#160; &#160; osascript -e 'tell application &#34;Xcode&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>In a similar vein, here&#8217;s a command I use for building the project of the current document in Xcode.</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="re2">PROJECT</span>=$<span class="br0">&#40;</span>ruby <span class="re5">--</span> <span class="st0">&quot;<span class="es3">${TM_BUNDLE_SUPPORT}</span>/bin/find_xcode_project.rb&quot;</span><span class="br0">&#41;</span>
<span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-f</span> <span class="st0">&quot;<span class="es3">${PROJECT}</span>/project.pbxproj&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span>
   open <span class="re5">-a</span> Xcode <span class="st0">&quot;<span class="es3">${PROJECT}</span>&quot;</span>
<span class="kw1">else</span>
   <span class="kw3">echo</span> <span class="st0">&quot;Didn't find an Xcode project file.&quot;</span>
   <span class="kw3">echo</span> <span class="st0">&quot;You may want to set TM_XCODE_PROJECT.&quot;</span>
<span class="kw1">fi</span>
&nbsp;
&nbsp;
osascript <span class="re5">-e</span> <span class="st_h">'tell application &quot;Xcode&quot;
	activate
&nbsp;
	set targetProject to project of active project document
	if (build targetProject) is equal to &quot;Build succeeded&quot; then
		launch targetProject
	end if
end tell'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://inquisitivecocoa.com/2009/09/12/build-current-project-in-xcode-textmate-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>As seen via gcc</title>
		<link>http://inquisitivecocoa.com/2009/08/14/my-current-favorite-private-cocoa/</link>
		<comments>http://inquisitivecocoa.com/2009/08/14/my-current-favorite-private-cocoa/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 17:19:25 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://inquisitivecocoa.com/2009/08/14/my-current-favorite-private-cocoa/</guid>
		<description><![CDATA[My current favorite private Cocoa method: +[NSSavePanel _crunchyRawUnbonedPanel]]]></description>
			<content:encoded><![CDATA[<p>My current favorite private Cocoa method:<br />
<code>+[NSSavePanel _crunchyRawUnbonedPanel]</code></p>
]]></content:encoded>
			<wfw:commentRss>http://inquisitivecocoa.com/2009/08/14/my-current-favorite-private-cocoa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

