fill the void

Posts from December 2008

UITextView in a UITableView on the iPhone

While writing FilePile, I wanted to use a UITextView in a UITableView, both subclasses of UIScrollView. The file information view needed a preview section and a list of attributes, so the two classes worked well together for previewing a text file and showing its file attributes. However, the UITextView was regularly blank, on the iPhone [...]


PackageMaker tips

At work, we’re using Apple’s built-in PackageMaker in our automated nightly builds to produce installer packages. The command-line version is very handy as we can incorporate it into scripts run every night with launchd, and for complicated package specs, the GUI version can save off a pmdoc bundle (a collection of XML files) that the [...]


Key-value observing uses paths, not data

Although I’ve been using Cocoa Bindings for a bit now, I just recently realized how key-value observing (KVO) works. It observes paths, not data. For example, let’s say I have NSString *foo in Bar class. Other classes can get the value with [bar valueForKeyPath:@"foo"]. But if I can set the value with foo = @”123″, [...]


NSProgressIndicator in NSTableView or NSOutlineView

Spinning wheels (NSProgressIndicator objects in Cocoa) are a common UI element in, well, all software these days. People like to know if applications are busy doing something and, if so, how much longer they’ll be. Web browsers, for instance, have continuous spinning wheels to indicate that they’re still downloading the requested page and discrete progress [...]