I recently started using Myriad Tables in a new project, but I was bumping into a problem, that I solved through in an unexpected manner. I’m posting it here because of the “AppleScript doesn’t have a class called number” discussion point, in case someone else encounters the same opaque error message I was seeing…
My script builds lists of 4 items:
- Ticker symbol from an internal database
- num of shares held from the same internal database: sharesHeld
- current stock quote pulled from the web: currentQuote
- (sharesHeld * currentQuote): currentValue
Each of those lists goes into a list (a list of lists) that ultimately gets sent to the table.
So now, the error: when I pass this list to Myriad Tables, it throws this error:
Error: -11010 Provided data: expected a number, but found some other class.
(FWIW, The Script Debugger reply pane reports the error as a list of 2 items: ‘false’ and ‘(NSError) Error Domain=au.com.myriad-com.SMSTableDialogBuilder.ErrorDomain Code=-11010 “Provided data: expected a number, but found some other class.” UserInfo={NSLocalizedDescription=Provided data: expected a number, but found some other class.}’)
Checking the class of the values confirms that AS is handling them all as real, so what to do? Coercing the incoming data to text works, but an incoming value such as 10.30 ends up as “10.3” which is less appealing, visually.
Now, it would have been nice if the error would report what the “other class” is, but in the back of my mind, I suspect the error would then read “expect a number, but found a number.” 
When that thought occurred to me, it dawned on me that the issue is probably somewhere in the coercion between an AppleScript ‘real’ and whatever the ‘other class’ might be (NSNumber maybe, but I’m not manipulating these values with ASOC anywhere along the way.)
In debugging it, I noticed that the sharesHeld & currentQuote data was triggering the error, but the current value data was not. So I got an unconventional idea:
set sharesHeld to (sharesHeld * 1)
set currentQuote to (currentQuote * 1)
and then add them to the list… and that works around the error!
In debugging this, I wrote this…
get class of sharesHeld – returns real
set sharesHeld to (sharesHeld * 1)
get class of sharesHeld – returns real
So as far as AppleScript is concerned, it starts with a real and ends with a real but for some reason, Myriad Tables dislikes the first real but accepts the second real
Anyhow, that’s my story and I’m sticking to it. I hope this helps anyone else who may bump up against this mysterious error.