Under Review
over 2 years ago

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
  • What is the replacement for Toybox.Application.AppBase.getProperty

    If you're targeting an older device (devices that don't support sdk-2.4 or later) there isn't one.

    If you're targeting a newer device, then either Application.Properties.getValue, or Storage.getValue, depending on exactly what you're doing. But others have claimed here that neither is an exact replacement, and getProperty does some things better...

Comment
  • What is the replacement for Toybox.Application.AppBase.getProperty

    If you're targeting an older device (devices that don't support sdk-2.4 or later) there isn't one.

    If you're targeting a newer device, then either Application.Properties.getValue, or Storage.getValue, depending on exactly what you're doing. But others have claimed here that neither is an exact replacement, and getProperty does some things better...

Children