Table View and Images

I have been playing around with Table View to load a series of images and have come to a full stop.

I only seem to be able to display one image in a row of data cells.

When I try to load them with images I get the following logged error.


ImageViewer has exited with status 0.
[Session started at 2005-10-02 21:00:55 +0100.]
2005-10-02 21:01:03.998 ImageViewer[3503] Exception raised during posting of notification. Ignored. exception: NSImageCell’s object value must be an NSImage.

When I have only one column formatted with NSImageCell everything works correctly.

What am I doing wrong. Can anyone help??

regards

tellboy


set the_table to table view "ThumbTable" of scroll view "ThumbTable" of window "ThumbViewer"
	set the_data_source to data source of the_table
	tell the_data_source
		try
			delete data rows
		end try
		try
			delete data columns
		end try
		make new data column at end of data columns with properties {name:"Image1"}
		make new data column at end of data columns with properties {name:"Image2"}
		set the_images to (pImagePaths of PropLib)
		set tCol to 1
		set the_row to make new data row at end of data rows
		repeat with this_image in the_images
			tell the_row
				set contents of data cell tCol to (load image (contents of this_image))
			end tell
			set tCol to tCol + 1
			if tCol is greater than 2 then
				set the_row to make new data row at end of data rows
				set tCol to 1
			end if
		end repeat
	end tell