2019r2.1 (dot operator)

I have tried to execute a project regularly running with the 2019r1.1

I receive hundreds of errors concerning a method called using the dot operator:

“There is more than one method with this name but this does not match any of the available signatures”
“Type mismatch error. Expected String, but got Int32”

If I use the str function, the project runs regularly.

	Function ToString(Extends b as Boolean) As String
	  if b= true then
	    return "Yes"
	  else
	    Return "No"
	  end if
	End Function

	Function ToString(Extends c as Currency) As String
	  return str(c)
	End Function

	Function ToString(Extends d as Double) As String
	  return format(d, "#.0#")
	End Function

	Function ToString(Extends i as Int32) As String
	  return str(i)
	End Function

	Function ToString(Extends i as Int64) As String
	  return str(i)
	End Function

	Function ToString(Extends t as Text) As String
	  Return str(t)
	End Function

	Sub Open()
	  var i As Integer = 10
	   var s As String
	   s = i.ToString
	End Sub

A few questions:

1/ Is your ‘ToSTring’ clashing with one now supplied by Xojo?
2/ Which line generates the error?
3/ You have defined an extension for Int32, but the sample code is using Integer, which is a 64bit variable
try adding :

Function ToString(Extends i as integer) As String return str(i) End Function

and probably look out for int32 and int64 use in your app, since you probably only need ‘integer’ now

toString is a native extension for most of the basic types.

You can mark your extension only for API1 if you use the module in many projects and also older release, otherwise you can remove them.

Since for double you use format, so you want a local format, you could rename them in localString since the native toString has an optional parameter for local format

Thank you.
my mistake, sorry.
I haven’t seen the native method ToString.

but I must say, especially after reading the problems of others who have much more complex and important projects than mine, that this revolution seems to me to be poorly managed and with little respect to those who pay for a license (I’m not among them).

because it forces you to stay with the r1.1 or to switch to the r2x, with a lot of extra and unpaid work to do and a very hazy future.

I hope no one will be offended.
I respect their hard work.

I understand your concerns, but every language evolves and usually for better.
But every change will cost some extra work to get a better language.

I know you have to change and check your toString extension, and one day I will have to check to empty extension (for string, array, popup, listbox). But if you and me have introduced such extensions was in order to get a better language, and this is what now you have.