Ticket Created

WERETECH-8118

Sim issue with saveWaypoints

In the sim using 3.1.5, the following sometimes doesn't work.

Toybox.PersistedContent.saveWaypoint(location, {:name => name});

It works fine in the device (a real 1030).

Parents
  • That's what I do in the code (I provide an option to exist as an intent).

    function getLocation(name)
    {
    if(appbase.hasStorage)
    {
    if (PersistedContent has :getWaypoints)
    {
    name = name.substring(0, iNameLength);

    var cit = PersistedContent.getWaypoints();
    while (cit != null)
    {
    var waypoint = cit.next();
    if (waypoint == null)
    {
    break;
    }
    if(waypoint.getName().equals(name))
    {
    return waypoint;
    }
    }
    }
    }
    return null;
    }

Comment
  • That's what I do in the code (I provide an option to exist as an intent).

    function getLocation(name)
    {
    if(appbase.hasStorage)
    {
    if (PersistedContent has :getWaypoints)
    {
    name = name.substring(0, iNameLength);

    var cit = PersistedContent.getWaypoints();
    while (cit != null)
    {
    var waypoint = cit.next();
    if (waypoint == null)
    {
    break;
    }
    if(waypoint.getName().equals(name))
    {
    return waypoint;
    }
    }
    }
    }
    return null;
    }

Children