nomad-software / tkd

GUI toolkit for the D programming language based on Tcl/Tk
MIT License
117 stars 16 forks source link

Changed setCoords parameter type. #35

Closed AustinMorris closed 8 years ago

AustinMorris commented 8 years ago

With coords having type int[], passing an argument of type double[] fails to compile from the type mismatch, but it also fails to compile when passed an int[], since it can't implicitly convert the int[] to a double[] when assigning to the _coords member. For example, using either the second or third lines below was causing an error.

auto line = new CanvasLine([0.0, 0.0, 9.0, 9.0]);
line.setCoords([0.0, 0.0, 9.0, 9.0]);
line.setCoords([0, 0, 9, 9]);
nomad-software commented 8 years ago

Good spot, thanks!

nomad-software commented 8 years ago

I've created a new release containing this fix too.

https://github.com/nomad-software/tkd/releases/tag/v1.1.6 http://code.dlang.org/packages/tkd