Tutorials
Links to Tutorial Series
Here is a list of past and present tutorial series featured on MacResearch:
Cocoa for Scientists (Part XXVI): Parsing CSV Data
Author: Drew McCormack
Web Site: www.maccoremac.com, www.macanics.net
On quite a few occasions, MacResearch readers have posted questions asking how you parse CSV (comma-separated values) data in Cocoa. CSV is a simple standard that is used to represent tables; it is used in widely varying fields, from Science to Finance — basically anywhere a table needs to be stored in a text file.
I’ve recently added CSV import to my flash card application, Mental Case. Before I began, I thought it would be a trivial matter of searching for some Objective-C sample code or an open source library with Google. I found solutions in scripting languages like Python, but nothing Cocoa based. After an hour or two of searching, I realized that if I wanted a Cocoa-native solution, I was going to have to roll my own. In this short tutorial, I will show you what I came up with, and hopefully save you the trouble of doing it yourself.
Generating a Backtrace with gfortran
On occasion, when you’re developing in Fortran (or any other compiled language), a program will stop with an error message, and you will be at a loss as to how execution ended up at the line in question. What you need is a backtrace, but because your program didn’t actually crash, no core dump occurs, and no backtrace is available.
Mac Productivity: Saving Keystrokes
![]()
Last fall, I began my new lab at the University of Pittsburgh. I've been using Macs almost exclusively since arriving.
I will share some shortcuts and productivity tips over the next few weeks that I picked up during my first year as a faculty member. The first is on saving keystrokes. The Mac has several extremely good programs which can expand text shortcuts and fix typos on-the-fly, including Typinator, TypeIt4Me, TextExpander, and SpellCatcherX.
Cocoa for Scientists (Part XXV): Core Animation Layer Trees
Author: Drew McCormack
Web Site: www.maccoremac.com
In the first part of this foray into Core Animation, we saw how you can animate the properties of a plain square layer, translating, scaling, and rotating in time. In this part, you’ll learn how to build up hierarchies of layers — the proverbial fleas on the fleas. To do this, we’ll finish off the Flea on Flea application, adding sublayers that creep and crawl on the backs of their superlayers, which in turn creep and crawl on the backs of theirs.
Cocoa for Scientists (XXIV): Core Animation First Steps
Author: Drew McCormack
Web Site: www.maccoremac.com
Arguably the most important change in Leopard was not a user feature, but a developer one: Core Animation. Over the coming years, the way applications look and react to user interaction will change dramatically, and that will be largely due to the ease with which interfaces can be animated with Core Animation. Sure, there will also be overt eye candy, but there will also be lots of more subtle changes to application interfaces that truly benefit the user, giving useful feedback.
Core Animation is obviously an enormous boon for user interface developers, but it has other uses too, such as visualization. There are many scientific applications for which Core Animation could be very useful. In the next few tutorials, I want to introduce Core Animation, and show its potential for scientific visualization. I won’t be showing you how to create the CoverFlow effect, or reprogram the Front Row application, but will hopefully introduce you to a whole new way of looking at Core Animation.
Using Vvidget for Quick Looking Line Graphs
Author: Lance
Web Site: www.vvi.com
Quick Look technology in Mac OS X 10.5 is used to change file content into a picture for the Finder. What would be more natural than turning files containing data into graphs? This tutorial shows how to do that for the staple of engineering, the line graph.
Lab Journal: Shared Virtual Machines

Author: Geoff Hutchison
Web Site: hutchison.chem.pitt.edu
In my group, we have some equipment that only has Windows software interfaces. So all of our Macs here have virtual machines via VMware Fusion. (Parallels Desktop would also have worked.)
One problem is that we want to share the virtual machine. Otherwise we would need to install 13GB VM images for each user in the group.
Structured Programming in Fortran
Author: Drew McCormack
Web Site: www.maccoremac.com
There are many books on Fortran programming available, and they all do a very good job of describing the syntax and constructions of the language. But there are very few books on Fortran that explain how to write robust software. These books exist in abundance for languages like C++ and Java, but Fortran programmers are usually left to fend for themselves, and the results are not always pretty.
Cocoa Tutorial: Image Kit, Cover Flow and Quicklook... doing things we shouldn't but that are too fun to resist
Author: David Gohara
Web Site: http://gohara.wustl.edu
Continuing from Part I of the IKImageBrowserView tutorial, I'm going to show you how to extend the project to do things that we shouldn't really do, but are so much fun it's impossible to resist. And really, when has anyone ever gotten in trouble for throwing caution to the wind?
In this part of the tutorial we'll take the previous project and modify it so that you can turn your IKImageBrowserView into a Cover Flow view AND we'll add Quicklook functionality to the view. I caution you that we'll be using private API's so do not use this in a shipping application and do not hold me responsible for any problems on future releases of the OS (this has been tested on 10.5.2). This tutorial is for education purposes only... blah, blah, blah.


