What's wrong with this level indicator cell?

I’m losing my mind trying to get this level indicator cell to work.

Here’s what I’ve got: I made a button to create a new data row on a test table:

on clicked theObject
	set theWindow to window "main"
	set theTable to table view "table" of scroll view "table" of theWindow
	
	set theDataSource to make new data source at end of data sources with properties {name:"tasks"}
	
	make new data column at end of data columns of theDataSource with properties {name:"levels"}
	make new data column at end of data columns of theDataSource with properties {name:"otherStuff"}
	set data source of theTable to theDataSource
	
	set newTask to make new data row at end of data rows of theDataSource
	
	set contents of data cell "otherStuff" of newTask to "This is working."
	set contents of control "theLevels" of data cell "levels" of newTask to 3
	
end clicked

When pressed, the data row is created, the “otherStuff” cell displays the assigned text, and then I get:

What am I missing?

Thanks!

Works perfectly. Thank you so much.

Cheers,
Doug