According to the docs ( http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/SimpleDataField.html ) you should be able to return a string from the compute method in Toybox::WatchUi::SimpleDataField ; "Allowed types are Number, Float, Long, Double, and String".
However a can't get a simple test like
class SimpleDataView extends Ui.SimpleDataField {
function initialize() {
label = "test";
}
function compute(info) {
//return 1;
//return 3.14;
return "hello";
}
}
to work. Returning 1 or 3.14 works like expected.
Bug in current SDK?