I am looking for a bit of tutoring on implementing this class. Assuming I have defined:
In drawables.xml:
<drawables>
<bitmap id="BtRound" x="113" y="26" filename="../images/btRound.png" dithering="none" >
<palette disableTransparency="false">
<color>FFFFFF</color>
<color>0000FF</color>
</palette>
</bitmap>
</drawables>
And in my main code:
class MyView extends Ui.WatchFace {
hidden var btImage = null;
//! Constructor
function initialize() {
WatchFace.initialize();
btImage = new Rez.Drawables.BtRound();
}
//! Load your resources here
function onLayout(dc) {
}
function onShow() {
}
//! Update the view
function onUpdate(dc) {
btImage.draw(dc);
}
}
I see the following error, yet this is exactly how it is implemented in the SDK samples. The only difference is that I have defined my bitmap inside drawables.xml instead of in its own file.
Failed invoking <symbol>
UnexpectedTypeException: Expected Class definition, given Number
initialize in C:\Users\Jeff\_my_garmin_workspace\Circulos\source\CirculosView.mc:49
getInitialView in C:\Users\Jeff\_my_garmin_workspace\Circulos\source\CirculosApp.mc:23
Unhandled Exception