Can't programmatilly add to a data cell w/formatter attached

Can anybody tell me why this won’t work? TimeTableDS is a data source that is properly attached to a table view. theDate is the first column of TimeTableDS and has been properly created within TimeTableDS. The AppleScript name of the column is correctly labeled.

to AddRow()
	set theRow to make new data row at the end of data rows of TimeTableDS
	set theDate to current date
	set the contents of data cell "theDate" of theRow to theDate --> this causes an NSRecieverEvaluationScriptError: 4(1)
	return theRow
end AddRow

I’ve been using the app (still in testing) without automatically adding the date to the table. Everything works as it should with the exception noted above.

I’ve tried removing the formmater and get the same results. For testing purposes, I had the date put into a data cell of another data column (of theRow) that hasn’t had a formatter attached and that works just fine.

Edit: I neglected to include the fact the the data column “theDate” has a date formatter attached to it. The attached formatter is: “%m/%d/%y” – it makes no difference if the formatter is attached or not. The code above doesn’t work on that column either way.

Thanks in Advance,
Brad Bumgarner, CTA

It’s official – I’m an idiot!! :rolleyes:

When I defined my columns, I mistaken deined the date column, not as “theDate” but as “theData” which, of course messed everything up!

“I go to the box. I feel shame.” – paraphrased from “Slapshot”