## PreferencesController.rb
# PreferencesExample
## Created by Matthew McCray on 1/18/08.
# Copyright (c) 2008 Elucidata (www.elucidata.net). All rights reserved.
#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
defawakeFromNib
window.toolbar.selectedItemIdentifier = window.toolbar.items[0].itemIdentifier
endend