
But now I want to show a png table as a background and put the numbers over top so that it looks better. But I can't get the table to work. I'm thinking that I have something wrong with either the drawbitmap code or even maybe the class. I'm getting this error when I comment out the //dc.drawBitmap code:
Failed invoking <symbol>
Invalid Value
@PC = 0x1000007d
@PC = 0x1000007d
Invalid Value
Invalid Value
Here's my code:
using Toybox.WatchUi as Ui;
using Toybox.Graphics as Gfx;
using Toybox.System as Sys;
using Toybox.Activity as Act;
class bigwavedave1View extends Ui.DataField {
var info;
var bmp;
var SPEED_THRESHOLD = 8*0.277778; //current speed in m/s from km/hr
var START_EVENT = false;
var STOP_EVENT = false;
//! Load your resources here
function onLayout() {
bmp = Ui.loadResource(Rez.Drawables.id_background);
}
//! Update the view
function onUpdate(dc) {
// Call parent’s onUpdate(dc) to redraw the layout
dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_WHITE);
dc.clear();
// show background table
dc.drawBitmap(205, 0, bmp); // => if I comment out this line then it runs fine
// get the activity info details
info = Act.getActivityInfo();
var clockTime = Sys.getClockTime();
if (info.currentSpeed != null) {
// start of event
if (info.currentSpeed >= SPEED_THRESHOLD && START_EVENT == false) {
etc....
<resources>
<string id="AppName">bigwavedave</string>
<bitmap id="LauncherIcon" filename="images/launcher_icon.png" />
<bitmap id="id_monkey" filename="images/monkey.png" />
<bitmap id="id_background" filename="images/bwd.png" />
</resources>
I'm not sure if:
class bigwavedave1View extends Ui.DataField {
should be:
class bigwavedave1View extends Ui.View {
? but that gives an error too:
Unexpected Type Error
Complete
Connection Finished
Closing shell and port
It would be nice if there was a datafield example instead of just the simpledatafield one.
The png file I want to use as a background:

I'm definitely a beginner at this so any help is appreciated. I'm surprised that I got this far :)
Thanks
Dave