In https://developer.garmin.com/connect-iq/api-docs/Toybox/Application/AppBase.html#onDeviceSettingChanged-instance_function we have this example:
using Toybox.System;
function onDeviceSettingChanged(aSymbol as Symbol, aValue as Object) as Void {
if (aSymbol == :distanceUnits) {
var newUnitSystem = aValue as UnitSystem;
System.println("Distance Units => " + (newUnitSystem == System.UNIT_METRIC ? "Metric" : "Statute"));
}
}
With strict typecheck this gives the following warning:
The private symbol 'distanceUnits' will not be found when using the indirect lookup syntax ':distanceUnits'. Consider making 'distanceUnits' public / protected or use a direct reference 'self.distanceUnits'.
Which makes me worried, as I am not sure if this is just a stupid warning, that shouldn't be there, or if it has any base, in which case how am I supposed to fix my code to be sure it always works?