Things look different, again. At the start of the year I converted this website from a dynamic Wordpress blog to a static Octopress blog. Now I’ve taken it one step further and converted the website to a static Jekyll powered website. It’s really awesome. Jekyll is a static site generator written in Ruby. Octopress itself is powered by it. I just feed the Jekyll monster with a template and some Markdown files and out pops a new website directory which I can push to any web host.
Read more...A common question that beginner Cocoa developers ask is how to build a preferences window for their application like the ones Apple uses (and seemingly every other Mac application). Given the number of ready built classes that Apple provides and the abundance of one style of preference window, one would assume that Apple provides a class for building preferences windows but, amazingly, they don't. There's no pre-built preferences window class for building automatically resizing, tab based preference windows. Instead, it's down to you to build your own, sort of. A bit of Googling around reveals several third party classes that handle these automatically resizing preferences windows perfectly. It's a reasonable bet that the majority of preferences windows in the 3rd party application you have on your Mac use one of these frameworks in fact.
Read more...Until Mac OS 10.8, Apple has failed to provide a good method for Cocoa applications (and other types of Mac OS X applications) to display notifications. As a solution to this problem, a third party open source project known as Growl exists to provide a notification framework for Mac OS X applications that is easy and convenient to use. The Growl framework is really easy to use and has a great, detailed documentation set available to developers, however the documentation seems to lack a quick start guide to get people up and running with Growl quickly. The documentation spends a lot of time explaining the ins and outs of Growl so this post aims to be a quick and concise guide to setting up Growl in your Cocoa application, showing you how to post a notification and receive a callback when a notification is clicked, the two most common Growl tasks.
Read more...It's reasonably common for an application to need to download a file from the internet nowadays. Quite often, these files come packaged as zip archives, which require extracting. When newish Cocoa developers encounter a zip file that they need to extract in their application, they'll often run to the Cocoa documentation to find a class and method that handles unarchiving a zip file. Apple doesn't provide a class for unarchiving files though. At least, not an immediately obvious one. When their searching of the docs fails, they'll turn to a 3rd party library to handle unarchiving. Plenty of these exist, but they're completely unnecessary. Apple provides an excellent tool for unarchiving files in Cocoa, people just don't realise they can use it. That tool, is NSTask.
Read more...If you're seeing this page then the conversion of SimpleCode from a Wordpress.com blog to a Heroku hosted, Octopress based blog has been a success! Regular readers will note that things look a little lot different. I've converted the blog to a Octopress blog, meaning it's now a static blog making it faster and, in my opinion, easier to manage. Octopress is a static blogging framework “designed for hackers”. Essentially, you write blog posts in Markdown (which is really easy to learn), run them through a generator which churns out a folder containing all the posts in HTML format, some Javascript & some styling. The folder can be pushed to virtually any server and then it's accessible on the web. Simple.