Dialog Box Not Reactivating

I am working in AppleScript Studio and XCode 3.2.6. I have a dialog box on the screen with a number of text fields, buttons, etc., in the dialog box and running just fine.

In this dialog box I also have a combo box called “COA” that was previously populated with a list of items. It also seems fine.

When a user chooses an item from the combo box, by dropping it down and selecting an item from the list, I use the “Action” Event Handler as below. This adds the item selected from the combo box to a list of items selected, unless the user has previously selected that item. And up to here everything works fine.

However, when the user goes back to the dialog box, any item selected must be clicked on twice to work (ANY item: buttons, text field, the combo box, etc. Even the cursor in the text field stops blinking until the user clicks on something first.) The first click on anything (even just the window) seems to “activate” the dialog box and the second then does the work. I tried using the “Activate” instruction (see commented line), but that didn’t fix it.

Can anyone shed some light on this mystery?

-------- Action Event Handler Starts Here
on action theObject

tell window of theObject --The dialog of theObject 
	set itemPicked to content of combo box "COA"
	if COAList does not contain itemPicked then
		set COAList to COAList & itemPicked
	end if
set content of table view "TVCOA" of scroll view "SVCOA" to COAList --Populate the table view again

end tell

end action