Carter Allen

Author


Programming a Menu Bar Button

The goal of this tutorial is to teach you how to create an icon in the menu bar for your application, which when pressed, activates the main application window. An example of this can be seen in the Iconfactory’s Twitterrific. The main class you will be exploring in this tutorial is NSStatusItem. Apple’s documentation for [...]

Database System Example Code

Of late I’ve been working on a Cocoa update for an old app of mine, xMod. xMod edits hidden preferences (I know, you’ve heard this all before.) Each preference is stored in a property list on its own, along with the information that xMod will display about it. This system will allow us to add [...]

Editing Another Application’s Preference File

Why is it difficult?
Most Cocoa developers will understand the use of the NSUserDefaults class. User Defaults is the system that Apple created allowing applications to store preference data in a Property List file on your computer. This is all well and good until you want to change a preference key in an application that isn’t [...]

Understanding Object-Oriented Programming and the MVC System

Introduction
Before you begin to learn the basic syntax of Cocoa (the API created by Apple for writing desktop Mac applications in Objective-C), you must first gain a firm grasp of the following two concepts:
  a. Object Oriented Programming
  b. The Model-View-Controller System (MVC)
Object Oriented programming is a way of writing code that allows you to [...]