James Montgomerie’s World Wide Web Log

THIn

I open-sourced a little bit of, as I’ve been calling it on Twitter, “THE GAME” - that is, the game Em and I’ve been working on: “THIn”: Three easy ways to do things later in Cocoa/Cocoa Touch.


THObserversAndBinders

I wrote some key-value observing (KVO) and key-value binding (KVB) helper classes for iOS and Mac OS X. Not much more to say about them than is in the ReadMe file on GitHub. I’m pleased with them. Comments (and pull requests) welcome.


YACYAML

I posted YACYAML, the Cocoa YAML parser/object archiver I’ve been working on for a little while to GitHub today. It converts Cocoa objects to and from YAML, a plain text, human friendly data serialization format.

YACYAML can be used in lots of ways - from replacing plists or JSON for simple config files, up to storing entire custom documents in an easy to view (and easy to hand-edit) format.

Why have I made this?

The short answer is that I like YAML. It’s ‘nicer’ than plists and JSON to edit, and it’s far, far, nicer to look at than …


Easy Xcode Static Library Subprojects and Submodules

In which a method is presented for reliably building static libraries with subprojects in Xcode, and it is suggested that this method, combined with Git submodules or other similar mechanisms, provides the best way to share libraries, frameworks, or other code between projects.

I’m sure I don’t need to tell you that it’s a useful thing to be able to share code between projects. On the small end of the scale, you might have created some nice views, or text processing classes, and want to be able to include them in multiple apps. On the larger end, perhaps you produce …


Using the Mac or iPhone's Built In Regex Routines

In which a convenient method of using POSIX regular expressions from Objective-C is presented.

It’s a common complaint that the Mac and iPhone platforms don’t have native support for regular expressions, but that’s not entirely true. If you drop down to the UNIX core, there’s an implementation of the old (and only partially busted) POSIX regular expression interfaces. Here, I’ll show a simple Objective-C wrapper class for them that lets you use them conveniently in Mac or iPhone apps.

Before I start, some preemptive remarks: There’s a lot wrong with POSIX regexes to modern eyes. Firstly, and most glaringly, the …


Syntax of the Future Past

There is a fair amount of complaining on The Internets at the moment about Objective-C and Apple’s choice to use it for the iPhone. Many newcomers to the ‘platform’ (if I can apply a singular name to Mac and iPhone development) are finding the language - and the Cocoa frameworks based on it - very confusing. Just how can a language with sooooo many square brackets! be at-all easy to use, after all?

This provoked some deja-vu. Hadn’t, my vague memories asked me, this complaining been done before? I seemed to remember some talk of an “alternate syntax” for Objective-C …