Deleting selected row(s) from a Table View?

Trying to delete selected row(s) from a table view. I’m not getting any errors, just nothing is happening. All NS tags are correct in the code.

if name of theObject is “removeBtn” then
set tableView to table view “servers” of scroll view “servers” of window of theObject
set selectedDataRows to selected data rows of tableView
if (count of selectedDataRows) > 0 then
tell window of theObject
delete (item 1 of selectedDataRows) --I assume this line is wrong, any ideas??
end tell
end if
end if

I assume the delete line is wrong, any ideas?

Thanks!

I’m all set, newbie error, Action Clicked was not checked.

Thanks!