December 3rd, 2009
Just started a collection of Xcode file and project templates on bitbucket.org.
The big feature of the collection is a project template for a document-based Cocoa application with explicit NSWindowControllers. This project illustrates using the Cocoa document architecture to implement an explicitly managed main window and an associated inspector window.
Download a zip archive of the project template here.
Posted in Cocoa, Shiny | No Comments »
September 30th, 2009
Using Automator on Mac OS X 10.6, it’s easy to create a service for the Finder that opens the currently selected folder in Murky.
Download MurkyFinderService.zip
Unzip, copy the .workflow file into your ~/Library/Services folder, and away you go.
Tags: Mercurial, Murky
Posted in Shiny, Utilities | No Comments »
September 30th, 2009
alias murky=’open -b com.mooseyard.Murky $PWD’
You’re in a shell and your current working directory is being tracked by Mercurial. It would handy to have a command to open the repo in Murky. Your wish is my command.
alias murky=’open -b com.mooseyard.Murky $PWD’
Add this line to your .profile and let ‘murky’ do the work, eh.
Tags: Mercurial, Murky
Posted in Shiny, Unix, Utilities | No Comments »
September 29th, 2009
In the spirit of OpenInTerminal and OpenInGitGui, I’ve put together an Automator application that will open the selected Finder folder in Murky. When said folder contains an Hg repository, all manner of good things happen.
Download OpenInMurky.zip
Installation and Use
- Download and unzip OpenInMurky.zip
- Drag OpenInMurky.app to your Finder’s toolbar.
- Navigate to your favorite Hg repository folder.
- Click on the OpenInMurky Finder toolbar item.
- Watch Murky open up your repository.
Tags: Mercurial, Murky
Posted in Shiny, Utilities | No Comments »
August 19th, 2009
I spent some time recently putting together a Cocoa interface to the built-in Apple System Logging (ASL) facility.
Following Peter Hosey’s excellent blog series on ASL and some other tidbits on Cocoa-Dev, I fashioned small and simple Cocoa framework for integrating ASL’s multi-leveled logging into your project.
—
#import <SOLogger/SOLogger.h>
SOLogger *logger;
logger = [SOLogger loggerForFacility: @"com.example.MyApp" options:ASL_OPT_STDERR];
[logger debug:@"A debugging note on: %@", [NSDate date]];
[logger info:@"We just did something."];
[logger notice:@"That's going to leave a mark"];
[logger warning:@"WTF?"];
[logger alert:@"WTF!"];
[logger critical:@"OMG"];
[logger panic:@"OMG WTF!"];
—
An interesting feature of SOLogger (courtesy of ASL) is that you can create separate loggers for subsystems in your code, potentially logging them to separate destinations.
I host the SOLogger project on Bitbucket with a BSD License.
Check it out.
Tags: Cocoa, code
Posted in Cocoa, Shiny, Utilities | No Comments »
March 14th, 2009
I love the sanity that GHUnit brings to running and debugging unit tests. The under-documented Xcode 3 mojo needed to configure SenTest unit test bundles for debugging throws a wet towel on the practice of test-driven Cocoa development.
The current GHUnit distribution runs all unit tests found in your app or framework. I did some work today to enable running a selected test cases and individual unit tests.
This works similarly to the SenTestingKit’s otest tool. You specify a unit test case and/or test name to run as an argument to the GHUnit test application.
In the Xcode’s executable panel for the test application, add arguments of the form:
-Test UserTests
-Test UserTests/testEmptyUserName
-Test All
When you run or debug the test app, only the specified test case or individual test will be executed. The argument -Test All will run all available unit test cases.
The patch file is here and works for Mac OS X. To apply the patch:
$ cd your-GHUnit-project-directory
$ patch -p1 < path-to-patch-file
I’ve submitted the patch to Gabriel, so maybe it’ll make it into a future release.
Tags: Cocoa, UnitTesting
Posted in Cocoa, Unit Testing | No Comments »
August 2nd, 2008
The next Syracuse Area CocoaHeads meeting is coming up. Next Tuesday, August 12.
Posted in CocoaHeads | No Comments »
August 2nd, 2008
[MattGallagher programming:Cocoa with:Love] is one of my new favorite Cocoa blogs. I discovered it through Planet Cocoa, so thanks for that.
Matt writes at a sweet spot of Cocoa geekness style that I find really appealing. He uses code recipes balanced with concise commentary to pack a lot of goodness into a tight blog posting. I want my blog articles to read like his.
Tags: Blogs
Posted in Cocoa | No Comments »
August 2nd, 2008
bithaus blogs about a category on NSImageView to do the reflection effect. A must for modern sexy UI.
See this on cocoadev.
Tags: NSImageView
Posted in Cocoa | No Comments »
August 2nd, 2008
Well, shit.
8:30 PM, July 31: 75% of seats for C4[2] have been sold. (C4 Twitter)
2:01 AM, August 1: C4[2] registration opens for the public early Friday morning, 2:01 AM, 8/1.
9:00 AM, August 2: C4[2] is sold out.
I completely missed the announcement until this morning. And apparently, previous attendees got first dibs at an early private registration.
C4 has been a small gathering in past years, with attendees capped at around 75. So there were likely around 18-20 open spots left when public registration opened. That’s not very many.
Looks like C4 is becoming an exclusive event along the lines of Davos. Someday, I’ll be invited. Oh, crap, I just spilled my milk…
Tags: whining
Posted in Cocoa | No Comments »