Following leads to the circular dependency error:
class DeviceInfo {
static const P_XTINY = new Font(Toybox.Graphics.FONT_XTINY, 4, 12, 3, 6); // Total: 19
static const P_TINY = new Font(Toybox.Graphics.FONT_TINY, 8, 19, 4, 11); // Total: 31
static const P_SMALL = new Font(Toybox.Graphics.FONT_SMALL, 8, 21, 5, 11); // Total: 34
static const P_MEDIUM = new Font(Toybox.Graphics.FONT_MEDIUM, 9, 25, 6, 13); // Total: 40
static const P_LARGE = new Font(Toybox.Graphics.FONT_LARGE, 9, 27, 7, 14); // Total: 43
static const P_NUMBER_MILD = new Font(Toybox.Graphics.FONT_NUMBER_MILD, 16, 32, 16, 15); // Total: 64
static const P_NUMBER_MEDIUM = new Font(Toybox.Graphics.FONT_NUMBER_MEDIUM, 20, 39, 20, 19); // Total: 79
static const P_NUMBER_HOT = new Font(Toybox.Graphics.FONT_NUMBER_HOT, 25, 54, 28, 25); // Total: 107
static const P_NUMBER_THAI_HOT = new Font(Toybox.Graphics.FONT_NUMBER_THAI_HOT, 29, 61, 32, 28); // Total: 122
static const FONT_MINI = DeviceInfo.P_XTINY;
static const FONT_SMALL = DeviceInfo.P_TINY;
static const FONT_MEDIUM = DeviceInfo.P_MEDIUM;
static const FONT_TIME_SMALL = DeviceInfo.P_NUMBER_MILD;
static const FONT_TIME_MEDIUM = DeviceInfo.P_NUMBER_MEDIUM;
static const FONT_TIME_LARGE = DeviceInfo.P_NUMBER_HOT;
}
The second code block that references the top definitions (all static const FONT_* defintions) lead to the circular dependency error. Why? I don't see this circular dependency...
I changed my code to solve this but still I'm interested, what the problem in the definitions file above really is.