Hi there
I tried to save a point type in a listmodel but when reading the value from the
list I get a error saying something like "undefined". This error happens in my
intex aqua fish.It does work on desktop and android.
My code is something like this:
ListModel { id: obstaclesList //obstacles are rectangles that
cannot be transposed, like walls for example //l is the top left
coordinate //r is the bottom right coordinate }
function addObstacle(l, r) { //console.log("adding obstacles to
list") obstaclesList.append({"l": l, "r": r}) }
function clearObstacles() { obstaclesList.clear() }
function getObstacle(i) { return obstaclesList.get(i) }
......
obstaclesList.addObstacle(mountain.baseTL, mountain.baseBR) // baseTL and
baseBR are Qt.point(....)
....obstaclesList.getObstacle(i).l // <- this line is where it fails
I solve this problem by changing the code to add / get real types instead of
point. Just curious why this happen, inititally I tought it could be some arm
limitation, but it does work good on a android mobile phone. Any ideias ?
BrJoão
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org