Analyze Project Results

I did an analysis of my project.
I am on a Mac.

It gives me many warnings in my canvasbutton.Paint events.
“Converting from Int64 to Double causes a possible loss of precision, which can lead to unexpected results.”

It is flagging such lines as :
g.FillOval(0, 0, 20, g.height)
it flags each of the numbers 0, 0, and 20!

It also doesn’t like:
Var strWidth as integer
strWidth = p.Graphics.TextWidth(Caption)

There must be 100 warnings! Makes it hard to look at what I can ignore or look at more closely!

The loss of precision warnings can be disabled. You can choose which warnings you wish to receive by selecting the menu item Project > Analysis Warnings...

Thanks for the quick response.

For

[quote]It is flagging such lines as :
g.FillOval(0, 0, 20, g.height)
it flags each of the numbers 0, 0, and 20![/quote]
change

g.FillOval(0, 0, 20, g.height)

to

g.FillOval(0., 0., 20., g.height)

that way it uses Double from the start and not Int64 (or you can put 0.0 and 20.0)

For

[quote]It also doesn’t like:
Var strWidth as integer
strWidth = p.Graphics.TextWidth(Caption)[/quote]
your are defining strWidth as Integer but p.Graphics.TextWidth(Caption) is giving you a Double. Maybe you can change

Var strWidth as integer

to

Var strWidth as Double

would be nice if there was a way to NOT flag conversion from integer to double as long as the int is in the range that a double does not lose precision
that way xojo could just NOT flag those as issues because they really arent - but only up to a point

Thanks Alberto!

I filed a feature request