I am a little confused…

Dim dx As Double = velocity * deltaT * cos(heading)
Dim dy as Double = velocity * deltaT * sin(heading)

Dim newPoint as New Point(currentLocation.X, currentLocation.Y)
newPoint.X = newPoint.X + dx

Cannot assign a value to this property
newPoint.X = newPoint.X + dx

What’s wrong?

Is this for Xojo 2019?
It looks like, back then, X/Y were read only.

Edit: or maybe changed in 2019r2/2019r3? I tested 2019r1.1
Edit2: I’m confused with the title ‘xojo.core.Point’ but code uses ‘New Point’

1 Like

Yes, I would be confused too, but in any case all Xojo.Core.* is deprecated and should not be used.

1 Like

if this is read only
maybe use .Translate or Point + Point

or as example

Dim newPoint as New Point(currentLocation.X+ dx, currentLocation.Y+ dy)

I have a using Xojo.core statement in the class declaration.

This ‘is’ what i am doing now, but still confused.

xojo have a few ‘‘by design’’ decisions or it was not enough tested …

So, I just dropped the Using statement and wrote a class called Point.

Xojo.Core.Point X and Y are read only according to the Xojo2019r1.1 documentation.
The example of Operator Add creates a new point.
Since Xojo2019r2 the newer Point (without xojo.core) is able to add without creating new point.

1 Like