Acknowledged

SDK 4.2.0 Beta 1 won't compile AppBase.getProperty

Given

  return Application.getApp().getProperty(s);
The compiler reports
  ERROR: fr235: test.mc: '$.Toybox.Application.AppBase.getProperty' is deprecated.
But fr235 doesn't support Application.Properties.getValue, so I *have* to use getProperty when compiling for fr235.
Parents
  • I think that the new compiler "advertises" itself as generating optimized code and not as it breaks old code. So it shouldn't change behaviour. And as it was pointed out by markw65 this is the only option for fenix3 or fr235, so it's not like "if you turn on strict then this is not good any more, use the new syntax". We have no choice but to use the old getProperty for devices that can have api level <2.4.0 so even strict shouldn't stop compiling this code! I think it shouldn't even give a warning when the device (possibly) doesn't have a newer api to use, but certainly not an error.

Comment
  • I think that the new compiler "advertises" itself as generating optimized code and not as it breaks old code. So it shouldn't change behaviour. And as it was pointed out by markw65 this is the only option for fenix3 or fr235, so it's not like "if you turn on strict then this is not good any more, use the new syntax". We have no choice but to use the old getProperty for devices that can have api level <2.4.0 so even strict shouldn't stop compiling this code! I think it shouldn't even give a warning when the device (possibly) doesn't have a newer api to use, but certainly not an error.

Children
No Data