Hi, I am getting an Unexpected type error in runtime when I try to run my complex datafiled on the Edge1040 simulator. Other devices run fine in the sim.
SDK: 4.1.4
Here is the code, the problem is with this line: mFitBGField.setData(0.0);
class dexDFView extends WatchUi.DataField {
hidden var mValue;
var mMessage;
var mFitBGField = null;
function initialize() {
DataField.initialize();
mValue = 0;
mMessage = "";
mFitBGField = createField(
"Glucose",
0,
FitContributor.DATA_TYPE_FLOAT,
{:mesgType=>FitContributor.MESG_TYPE_RECORD, :units=>"mmol or mg/dl" }
);
mFitBGField.setData(0.0);
}
I can't see any obvious isues with the code, and it runs fine on other Edge devices
Run-time error:
Error: Unexpected Type Error
Details: Failed invoking <symbol>