Symbol not found with new SDK

Hi

I recently updated my datafield to the new sdk 4.2.3 and now 4.2.4 (from 4.1.2).

I got a compilation error in this line:

if(info has :distanceToDestination && info.distanceToDestination != null) {

It seems the new SDK does not have the "has :distanceToDestination".

I removed the "has" clause and now a user has the problem that it crashes in this line (FR955 Solar) with an "Symbol not found error".

if(info.distanceToDestination != null) {

What should I do in this case ? Shouldnt the variable distanceToDestination not always be available and when not set, at least be null??

thanks for your help

regards

Erich

  • Hi Erich!

    I'm working with VS Code and SDK 4.2.4.

    For Edge devices, your line

    if(info has :distanceToDestination && info.distanceToDestination != null) {

    generates no compilation error.

    For my datafields I only use following for getting the distanceToDestination - and there's no crash if there is no course loaded:

    if(info.distanceToDestination != null) {

    Even if no course is loaded, distanceToDestination delivers 0.0000 (not null).

    So, seems not to be a general SDK 4.2.4 problem...

  • What is the actual error message you see?  Is it coming from type checking?