Leopard AppKit additions

Leopard just arrived this morning (TNT messed up yesterday) and thus far I’m loving it. Time Machine is in the process of performing its initial backup, so I’ll reserve judgement on speed until later, but the UI feels extremely responsive even with the backup going on.

Anyway, to the point of this post. I’ve briefly looked over the new developer documentation and have uncovered the following gems:

NSGradient
Looks like CTGradient won’t be necessary anymore, as Apple has added an NSGradient class to AppKit. This move is extremely welcome if long overdue — creating gradients previously involved a whole mess of core graphics shading calls (or using CTGradient).

NSCollectionView
Renamed from NSGridView in the developer seeds, NSCollectionView has apparently “been added to facilitate interesting animations”. I would have said it’s been added to display a collection of objects, but motives aside, this is really great AppKit addition, allowing for straightforward creation of iPhoto-style grids of basically anything you want. Each item in the grid is (unsurprisingly) an NSCollectionViewItem, created from a prototype view containing anything that knows how to draw itself, for example, an NSImageView and an NSTextField combined together in an NSBox.

NSRuleEditor and NSPredicatedEditor
NSPredicateEditor is a pre-built “criteria-builder” for things like smart folders:
predicate_editor.png
This ties into bindings and looks massively powerful.

HUD style windows
The head-up display style windows as found in iLife, iWork and now QuickLook are now a standard option of NSPanel, exposed in Interface Builder.

NSPathControl
Awesome. A standard control for showing file paths, probably powering the Finder’s “bread-crumb trail”:
path_control.png

NSToolbar enhancements
NSToolbars can now be edited directly in InterfaceBuilder!

NSSplitView enhancements
Loads of (overdue) improvements to NSSplitView, including divider-position-and-subview-collapse-autosave, the addition of -setDividerStyle: (for thick or thin dividers), programmatic subview collapse, easier double-click-view-collapse support, the ability to hide the divider when a subview is completely collapsed and a beautiful host of bug fixes.

Accessory views in NSAlert
NSAlert now supports the straightforward addition of a suppression checkbox (i.e. a “Do not show me this message again” option) and a -setAccessoryView: method for, surprisingly, adding an accessory view.

NSDockTile
-setBadgeLabel: and -setContentView: support for NSApplication AND NSWindow (for either the app or minimised windows)!

There is just so much new stuff, I can’t wait to get properly stuck in!

The most hideous Apple screenshot of all time

I haven’t posted much about Leopard since WWDC, but I just today felt compelled to post this:
Leopard Spotlight menu
It’s an absolute interface abomination on at least three counts:

  • the menu bar is transparent, which is a pretty bad idea,
  • the Spotlight icon is still black despite the menu being selected and
  • while the actual menu highlight is blue, the space surrounding the Spotlight field is graphite (I wonder which setting is actually active in the Appearance pref pane)

Such interface anomalies are, of course, to be expected in beta builds of software, I was just so surprised to find this particular one gracing Apple’s website.

RIP LC

We got rid of our 17-year old Macintosh LC yesterday. It was an absolute beast of a machine, with a 16 MHz 68020 processor, 4 Mb of RAM and a 40 Mb HD (and cost a rather unbelievable £1727 back in 1990 — including a 12-inch colour monitor, ImageWriter II and MacWrite II). My dad used it for word processing and a bit of Tetris right up to when its power supply packed up a couple of weeks ago. I think this was mainly because it booted in 19 seconds, which is marginally faster than my MacBook Pro! Check these out:
LC RAM and VRAM
That’s what 512 Kb of VRAM (top) and 1 Mb of RAM looked like in 1990. Amazing how things progress…