You ever tried to create a toolbar using Interface Builder?
I know that is not compatible with earlier versions of OS X but it is so easy, you can’t even imagine! You simple drag and drop the NSToolbar to the window and you have implemented one of the standard interfaces for your preferences window!

Although you will notice that toolbar items are not selected! You need to add the following snippet to your code to have the selected toolbar items!
-(NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar {
return [[toolbar items] valueForKey:@”itemIdentifier”];
}