## PreferencesController.rb
# Example Preferences Window Controller
## Created by Matthew McCray on 12/23/07.
# Copyright (c) 2008 Matthew McCray, Elucidata (www.elucidata.net)
#require'osx/cocoa'classPreferencesController< OSX::NSWindowControllerincludeOSX# This is the target action for the toolbar items
ib_action :selectPrefPaneldo |sender|# We'll do stuff here later...
enddefinitselfifself.initWithWindowNibName_owner('Preferences',self)end# Delegate method that returns the itemIdentifiers for the selectable items
# (in our case, all of 'em)
deftoolbarSelectableItemIdentifiers(toolbar)@toolbaritemidents||=begin
window.toolbar.items.map {|item| item.itemIdentifier }endend# Select the first toolbar item when the window loads
defwindowDidLoad
window.toolbar.selectedItemIdentifier = window.toolbar.items[0].itemIdentifier
endend