New devices and SDK demanded code updates

The SDK upgrade called for more careful specification of "or Null" on some fields in classes. The new devices have been added with their resource needs. Need to check if there's an issue with Edge 850 device.
This commit is contained in:
Philip Abbey
2025-09-29 21:00:13 +01:00
parent 28dc5a163c
commit ac97a8af0d
15 changed files with 93 additions and 13 deletions

View File

@@ -46,27 +46,27 @@ class Alert extends WatchUi.View {
function initialize(params as Lang.Dictionary) {
View.initialize();
mText = params[:text] as Lang.String;
mText = params[:text] as Lang.String?;
if (mText == null) {
mText = "Alert";
}
mFont = params[:font] as Graphics.FontType;
mFont = params[:font] as Graphics.FontType?;
if (mFont == null) {
mFont = Graphics.FONT_MEDIUM;
}
mFgcolor = params[:fgcolor] as Graphics.ColorType;
mFgcolor = params[:fgcolor] as Graphics.ColorType?;
if (mFgcolor == null) {
mFgcolor = Graphics.COLOR_BLACK;
}
mBgcolor = params[:bgcolor] as Graphics.ColorType;
mBgcolor = params[:bgcolor] as Graphics.ColorType?;
if (mBgcolor == null) {
mBgcolor = Graphics.COLOR_WHITE;
}
mTimeout = params[:timeout] as Lang.Number;
mTimeout = params[:timeout] as Lang.Number?;
if (mTimeout == null) {
mTimeout = 2000;
}