How do I delete an item from a table view

I’ve tried to use this code:

if name of theObject is "AVerwijderArtiest" then
		set myArtists to contents of table view "AArtiesten" of scroll view "AArtiesten" of window "add" as list
		set GekozenArtiest to contents of data cell 1 of selected data row of table view "AArtiesten" of scroll view "AArtiesten" of window "add"
		
		-- niewe lijst maken
		set myCount to 1
		set myNewArtists to {}
		repeat count myArtists times
			if item myCount of myArtists is not GekozenArtiest then set end of myNewArtists to item myCount of myArtists
			set myCount to myCount + 1
		end repeat
		
		-- AArtiesten updaten
		set contents of table view "AArtiesten" of scroll view "AArtiesten" of window "add" to myNewArtists
	end if

but it wont work

What the hell do I have to write to make it work???

explane variables: dutch → english
verwijderen = delete
gekozen = choose
artiest = artist

Thanx
ief2

Model: iMac G5
Browser: Safari 531.9
Operating System: Mac OS X (10.5)

Hi,

take a look at the Table example in /Developer/Examples/AppleScript Studio/Table/
There are two versions with and without a DataSource

thanx, it was so simple: delete .

the only issue is that the deleted data row is not deleted from the artist list
but that’s not very important

thanx stefan,
ief2