Weird table view / data source behaviour: script hangs on resizing

Hello,

this is weird. A table view causes the applescript that works on its data source to hang when it is scrolled or the columns are resized. Here is the code that starts appearing in my nightmares:


-- SETTING UP THE DATA SOURCE
-- ...
if DSExists = false then -- create data source for table view only if not existing
	set TheDataSource to make new data source at end of data sources with properties {name:"TheDataSource"}
	tell TheDataSource
		make new data column at the end of the data columns with properties {name:"Text1"}
		make new data column at the end of the data columns with properties {name:"Text2"}
		make new data column at the end of the data columns with properties {name:"Text3"} 
	end tell
	set the data source of table view "TheTView" of scroll view "TheSView" of window "TheWin" to TheDataSource
	set DSExists to true
else
	delete every data row of TheDataSource -- if existing make empty
end if
tell table view "TheTView" of scroll view "TheSView" of window "TheWin" 
	set contents of header cell of table column "Text 1" 
	set contents of header cell of table column  "Text 2" 
	set contents of header cell of table column  "Text 3" 
end tell
set visible of window "TheWin" to true -- show it

-- POPULATING THE DATA SOURCE & TABLE VIEW
repeat with n from 1 to someNumber 
	append TheDataSource with {{text1, text2, text3}} -- new record in datasource 
	call method "scrollRowToVisible:" of (table view "TheTView" of scroll view "TheSView" of window "TheWin") with parameter (n - 1) --show the new record -- commenting this line out has NO EFFECT on the script's vulnerability to resizing/scrolling.
end repeat

The script hangs when the columns in the table view are resized manually, or the scroll view is scrolled manually, while the loop is populating the view.
When I set the columns of the table view to “Editable” in Interface Builder, the resizing is tolerated, the scrolling is not.

This puzzles me no end. Of course there would be the workaround of not displaying the window that holds the table view until the loop has finished… But what is wrong in the above script? Or did I miss some crucial settings in Interface Builder?

Thanks for every hint or suggestion!
LG