====== Mac OS X Development Notes ====== Recently I've finally started learning how to develop applications for Mac OS X, or macOS as Apple likes to call it these days. I want to get a good idea of how Cocoa applications actually work, so I'm learning Objective-C before diving into [[https://www.swift.org/|Swift]]. I'm basing my learning heavily on the book [[https://www.oreilly.com/library/view/cocoa-programming-for/9780132902199/|Cocoa Programming for Mac OS X]]. ===== Common Design Features ===== As the years passed, many common design patterns in OS X applications started emerging, this should provide resources on how to use them. ==== NSTableView with +/- buttons ==== {{:devnotes:nstableview-plus-minus-toolbar.png?nolink |Example of NSTableView with +/- buttons}} Many applications in OS X have an ''NSTableView'' with +/- buttons in a toolbar at its bottom. This provides a sleek design solution to a problem: How to I provide users a way to add new items to a list? With this approach you just let the user click the + button and a new entry is created and ready to be edited. The way to create this element is by utilizing the ''NSSegmentedControl'' component. A great tutorial on how to do this is available on StackOverflow: [[https://stackoverflow.com/questions/22586313/nstableview-with-buttons-like-in-system-preferences-using-only-interface-bui|NSTableView with +/- buttons like in System Preferences using only Interface Builder]]. ===== References ===== Here is a collection of great resources on old Mac OS X programming: * [[https://forums.macrumors.com/threads/developing-for-tiger-and-leopard-powerpc-a-devlog.2383838/|Developing for Tiger and Leopard / PowerPC (a devlog)]]