Shapefile-Categories Error 5.2.2

When changing from 5.1.1 to 5.2.2 Shapefile-Categories are not working properly:
Before and After:

No changes to the Software, just installing latest version of Mapwingis
Any suggestions for solution?

Issue found:

Interface of Labels.AddLabel function has changed from 5.1 to 5.2:
Sub AddLabel(Text As String, x As Double, y As Double, Optional Rotation As Double = 0, Optional Category As Integer = -1)
to
Sub AddLabel(Text As String, x As Double, y As Double, Optional OffsetX As Double = 0, Optional OffsetY As Double = 0, Optional Rotation As Double = 0, Optional Category As Integer = -1)

and therefore the position of Parameters “Rotation” an “Category” has changed.
No error or warnings because new Offset - Parameters are optional!

Be careful!

Solution of MWGIS-201 is probably the reason.

Regards,
Frank

I agree that the new optional parameters should have been added at the end so as not to break existing code.

Jerry.

@jerryfaust I just published a new release candidate, so we don’t have a stable version yet.
We could still fix the order of AddLabel to be more backwards compatible.

@Mathijs.Dumon: It is your change. What do you think?

Changing the order is an option indeed. I wont be able to make that change soon though, currently on holiday.

I can make the change this weekend. It should not take long.

Regards.

Ok. I have updated the code, placing the new optional parameters at the end of the parameter list. I have also updated MWGIS-201 accordingly.

The functions affected were:
AddLabel, InsertLabel, AddPart, InsertPart, CreateNewLabel, and AddLabelToShape.

Thank you, @frank2x460, for pointing this out.

Regards,
Jerry.