/ config-buttons.applescript
config-buttons.applescript
 1  on clicked theObject
 2  	if name of theObject is "cancel" then
 3  		try
 4  			close panel (window of theObject)
 5  		on error
 6  			display dialog "Error closing configuration panel (try)"
 7  		end try
 8  	else if name of theObject is "save" then
 9  		try
10  			close panel (window of theObject) with result 1
11  		on error
12  			display dialog "Error closing configuration panel (try)"
13  		end try
14  	else
15  		-- should never get here
16  		display dialog "config-buttons.applescript was passed a bad object named:" & (name of theObject)
17  	end if
18  end clicked
19