We are moving. View our new website for Risk Engine development here

Engineering for the real world

Example Cocoa code

It always seems odd how it is difficult to find examples of the application you are working on. For me, just starting to learn Cocoa, tutorials and example applications have been the key to my learning. But for some reason you can never find the right tutorial to sort out the problem you are working on.
With this post I'm releasing some of my code into the wild for those new to Cocoa development. I'm not going to claim that the quality of the code is great and it doesn't really do anything very special, but it is out there and might help a few people solve some of the more basic problems that I had to initially deal with.
For the record, the application is designed to do some basic analysis for a tunnel, estimating the Fenner-Pacher curve. Some of the key Cocoa concepts in the application are:
  • Use of Core Data
  • Use of triggerChangeNotificationsForDependentKey for automatically updating data
  • Creating a graph which automatically updates using tableViewSelectionDidChange
  • Performing mathematical and engineering calculations
The method for creating the graph is based on the delegate method which is used in Step into XCode Mac OSX Development (for OS 10.4) and XCode 3 unleashed (for OS 10.5) by Fritz Anderson. A tutorial by Tim Isted gives another method, using bindings, to create automatically updating graphs.

You can download my source code here.